From a55011eb689d8403b733c51cc1802147ac451cac Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 28 Dec 2015 20:15:28 -0600 Subject: [PATCH] Make the duplicate entity UUID warning toggleable --- .../0076-Add-PlayerInitialSpawnEvent.patch | 6 +-- ...icate-entity-UUID-logging-toggleable.patch | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 Spigot-Server-Patches/0077-Make-duplicate-entity-UUID-logging-toggleable.patch diff --git a/Spigot-Server-Patches/0076-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0076-Add-PlayerInitialSpawnEvent.patch index c7ed7427e0..9326df2c63 100644 --- a/Spigot-Server-Patches/0076-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0076-Add-PlayerInitialSpawnEvent.patch @@ -1,4 +1,4 @@ -From 364348e091cd60843ae06ff5add8b4affcac2d83 Mon Sep 17 00:00:00 2001 +From c63a19607dba02582a3e2f7ec98d9e16402ea885 Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Tue, 22 Dec 2015 22:04:15 -0600 Subject: [PATCH] Add PlayerInitialSpawnEvent @@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent For modifying a player's initial spawn location as they join the server diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index deb0b82..becd11c 100644 +index deb0b82..c33915e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -99,6 +88,22 @@ public abstract class PlayerList { +@@ -99,6 +99,22 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/Spigot-Server-Patches/0077-Make-duplicate-entity-UUID-logging-toggleable.patch b/Spigot-Server-Patches/0077-Make-duplicate-entity-UUID-logging-toggleable.patch new file mode 100644 index 0000000000..df809ff474 --- /dev/null +++ b/Spigot-Server-Patches/0077-Make-duplicate-entity-UUID-logging-toggleable.patch @@ -0,0 +1,37 @@ +From 3a58d39da336a69bd6f3318aedaf60b1719b23a1 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Mon, 28 Dec 2015 20:06:25 -0600 +Subject: [PATCH] Make duplicate entity UUID logging toggleable + + +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 6186f6c..3ec58dc 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -995,7 +995,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { + // CraftBukkit start + UUID uuid = entity.getUniqueID(); + +- if (this.entitiesByUUID.containsKey(uuid)) { ++ if (this.paperSpigotConfig.logDuplicateEntityUUIDs && this.entitiesByUUID.containsKey(uuid)) { // PaperSpigot - Make toggleable + Entity entity1 = (Entity) this.entitiesByUUID.get(uuid); + + if (this.g.contains(entity1)) { +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index 7d46f2c..fbb83a1 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -414,4 +414,10 @@ public class PaperSpigotWorldConfig + { + useHopperCheck = getBoolean( "use-hopper-check", false ); + } ++ ++ public boolean logDuplicateEntityUUIDs; ++ private void logDuplicateEntityUUIDs() ++ { ++ logDuplicateEntityUUIDs = getBoolean( "log-duplicate-entity-UUIDs", true ); ++ } + } +-- +2.6.4 +