From cff8ae96446acaa3e48c15093ff09e050e59b032 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 22 Mar 2018 23:32:55 -0400 Subject: [PATCH] Use copies for PlayerProfile in PaperServerList and SkullMeta Don't want to risk mutating players properties in server list (unlikely, but lets be proper) and Skull also has a setter API, so that should be used too. --- ...h => 0090-Add-extended-PaperServerListPingEvent.patch} | 4 ++-- ... => 0091-Implement-deprecated-player-sample-API.patch} | 6 +++--- ...e-API.patch => 0092-Player.setPlayerProfile-API.patch} | 2 +- ...niqueId-API.patch => 0093-getPlayerUniqueId-API.patch} | 2 +- .../0262-Add-SkullMeta.setPlayerProfile-API.patch | 6 +++--- ...0274-Implement-extended-PaperServerListPingEvent.patch | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) rename Spigot-API-Patches/{0089-Add-extended-PaperServerListPingEvent.patch => 0090-Add-extended-PaperServerListPingEvent.patch} (99%) rename Spigot-API-Patches/{0090-Implement-deprecated-player-sample-API.patch => 0091-Implement-deprecated-player-sample-API.patch} (96%) rename Spigot-API-Patches/{0090-Player.setPlayerProfile-API.patch => 0092-Player.setPlayerProfile-API.patch} (95%) rename Spigot-API-Patches/{0091-getPlayerUniqueId-API.patch => 0093-getPlayerUniqueId-API.patch} (97%) diff --git a/Spigot-API-Patches/0089-Add-extended-PaperServerListPingEvent.patch b/Spigot-API-Patches/0090-Add-extended-PaperServerListPingEvent.patch similarity index 99% rename from Spigot-API-Patches/0089-Add-extended-PaperServerListPingEvent.patch rename to Spigot-API-Patches/0090-Add-extended-PaperServerListPingEvent.patch index 24c26d037..f75693e42 100644 --- a/Spigot-API-Patches/0089-Add-extended-PaperServerListPingEvent.patch +++ b/Spigot-API-Patches/0090-Add-extended-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From 8614ecd3ac7244618cab3302a3c2f28105276966 Mon Sep 17 00:00:00 2001 +From f95d94a0aae2bdf7ba855b6149ee8c24bf86ffe1 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 15:55:38 +0200 Subject: [PATCH] Add extended PaperServerListPingEvent @@ -366,5 +366,5 @@ index 04804706..44563482 100644 + // Paper end } -- -2.16.1 +2.16.2 diff --git a/Spigot-API-Patches/0090-Implement-deprecated-player-sample-API.patch b/Spigot-API-Patches/0091-Implement-deprecated-player-sample-API.patch similarity index 96% rename from Spigot-API-Patches/0090-Implement-deprecated-player-sample-API.patch rename to Spigot-API-Patches/0091-Implement-deprecated-player-sample-API.patch index 4e5911322..dc128f1ae 100644 --- a/Spigot-API-Patches/0090-Implement-deprecated-player-sample-API.patch +++ b/Spigot-API-Patches/0091-Implement-deprecated-player-sample-API.patch @@ -1,11 +1,11 @@ -From 9ed51547f8f2474fdda8cfd6178dcaa7b301dc0a Mon Sep 17 00:00:00 2001 +From 13d00b73c9c88b40409ce727328ecc3555796068 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Mon, 27 Nov 2017 16:21:19 +0100 Subject: [PATCH] Implement deprecated player sample API diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java -index a6576f99..41899698 100644 +index dd1deafd..32cf9f01 100644 --- a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java +++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java @@ -4,6 +4,8 @@ import static java.util.Objects.requireNonNull; @@ -74,5 +74,5 @@ index cb8d0fcd..116d7c7a 100644 @Deprecated public java.util.List getSampleText() { -- -2.16.1 +2.16.2 diff --git a/Spigot-API-Patches/0090-Player.setPlayerProfile-API.patch b/Spigot-API-Patches/0092-Player.setPlayerProfile-API.patch similarity index 95% rename from Spigot-API-Patches/0090-Player.setPlayerProfile-API.patch rename to Spigot-API-Patches/0092-Player.setPlayerProfile-API.patch index 9f0b96ed0..6be5f6586 100644 --- a/Spigot-API-Patches/0090-Player.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/0092-Player.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From f5c60e86827ed8e6029637444ad16aa0545169d2 Mon Sep 17 00:00:00 2001 +From 879fa631394505d943114e55e0b1f02d124b518a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 18 Mar 2018 12:28:55 -0400 Subject: [PATCH] Player.setPlayerProfile API diff --git a/Spigot-API-Patches/0091-getPlayerUniqueId-API.patch b/Spigot-API-Patches/0093-getPlayerUniqueId-API.patch similarity index 97% rename from Spigot-API-Patches/0091-getPlayerUniqueId-API.patch rename to Spigot-API-Patches/0093-getPlayerUniqueId-API.patch index b2d4a0b22..4a229847a 100644 --- a/Spigot-API-Patches/0091-getPlayerUniqueId-API.patch +++ b/Spigot-API-Patches/0093-getPlayerUniqueId-API.patch @@ -1,4 +1,4 @@ -From 780999dfaf18ca6223e57e089241ff73a95e8ccd Mon Sep 17 00:00:00 2001 +From 866101379fee022401d3a461e51536c93239df50 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 22 Mar 2018 01:39:28 -0400 Subject: [PATCH] getPlayerUniqueId API diff --git a/Spigot-Server-Patches/0262-Add-SkullMeta.setPlayerProfile-API.patch b/Spigot-Server-Patches/0262-Add-SkullMeta.setPlayerProfile-API.patch index 0636e353d..7b5c515c0 100644 --- a/Spigot-Server-Patches/0262-Add-SkullMeta.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0262-Add-SkullMeta.setPlayerProfile-API.patch @@ -1,4 +1,4 @@ -From dc84dd3d43671fc1197e4e976eaca94cbc1e112f Mon Sep 17 00:00:00 2001 +From 8f9e12c59e5c19ba02c4baad5a2d5575a07a3ffc Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 19 Jan 2018 00:36:25 -0500 Subject: [PATCH] Add SkullMeta.setPlayerProfile API @@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo which commonly cause rate limit issues with Mojang API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index e2ea49cd9..4855307b9 100644 +index e2ea49cd9..dbc083351 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -2,6 +2,8 @@ package org.bukkit.craftbukkit.inventory; @@ -41,7 +41,7 @@ index e2ea49cd9..4855307b9 100644 + @Nullable + @Override + public PlayerProfile getPlayerProfile() { -+ return profile != null ? CraftPlayerProfile.asBukkitMirror(profile) : null; ++ return profile != null ? CraftPlayerProfile.asBukkitCopy(profile) : null; + } + // Paper end + diff --git a/Spigot-Server-Patches/0274-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0274-Implement-extended-PaperServerListPingEvent.patch index 055af2ec5..ec4cdbf9c 100644 --- a/Spigot-Server-Patches/0274-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0274-Implement-extended-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From be13b11e1cb79084ab4d0b400ab6c013a0357fa7 Mon Sep 17 00:00:00 2001 +From 26a88cddba5d4b477a501c983fead50ad3c9e5df Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 15:56:26 +0200 Subject: [PATCH] Implement extended PaperServerListPingEvent @@ -60,7 +60,7 @@ index 000000000..a2a409e63 +} diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java new file mode 100644 -index 000000000..33dd196fb +index 000000000..350410527 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java @@ -0,0 +1,112 @@ @@ -101,7 +101,7 @@ index 000000000..33dd196fb + + if (this.originalSample != null) { + for (GameProfile profile : this.originalSample) { -+ sample.add(CraftPlayerProfile.asBukkitMirror(profile)); ++ sample.add(CraftPlayerProfile.asBukkitCopy(profile)); + } + this.originalSample = null; + } @@ -177,7 +177,7 @@ index 000000000..33dd196fb + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e8c72db96..9da09d53b 100644 +index 579f0ba0d..99cfe1ae5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -768,7 +768,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs