From 09e2551bc1f67515ae810e160e375db0d1dde689 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Sat, 7 Mar 2015 13:34:07 +0000 Subject: [PATCH] Fix the player's uuid being null in Bungee mode/offline mode --- Bukkit-Patches/0029-BungeeCord-Chat-API.patch | 6 +++--- CraftBukkit-Patches/0001-POM-Changes.patch | 10 +++++----- .../0006-Better-Chunk-Tick-Selection.patch | 10 +++++----- CraftBukkit-Patches/0011-View-Distance.patch | 6 +++--- CraftBukkit-Patches/0012-Spigot-Timings.patch | 8 ++++---- .../0055-Fire-PreLogin-Events-in-Offline-Mode.patch | 11 ++++++----- .../0144-Fix-Corrupted-Trapped-Chest.patch | 6 +++--- .../0149-Limit-TNT-Detonations-per-tick.patch | 6 +++--- 8 files changed, 32 insertions(+), 31 deletions(-) diff --git a/Bukkit-Patches/0029-BungeeCord-Chat-API.patch b/Bukkit-Patches/0029-BungeeCord-Chat-API.patch index b03966a17..b9b144a4a 100644 --- a/Bukkit-Patches/0029-BungeeCord-Chat-API.patch +++ b/Bukkit-Patches/0029-BungeeCord-Chat-API.patch @@ -1,14 +1,14 @@ -From f5d25d30e1b929af4439166d271eabc2f6eca2b1 Mon Sep 17 00:00:00 2001 +From b21ee76703ea474fb5417e41846220635a56b375 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 13 Dec 2014 12:59:14 +1100 Subject: [PATCH] BungeeCord Chat API diff --git a/pom.xml b/pom.xml -index 7be35f3..91cecac 100644 +index 78f50bd..3e52a20 100644 --- a/pom.xml +++ b/pom.xml -@@ -77,6 +77,14 @@ +@@ -82,6 +82,14 @@ 1.14 compile diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index 51baaa415..3b90aad84 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -1,4 +1,4 @@ -From d2ba450a4a2ae61f6d3ba8b45bf56a696d0c7eb4 Mon Sep 17 00:00:00 2001 +From 8aef7c3b71fe438e210691764d955554efd55040 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 2 Jul 2013 13:07:39 +1000 Subject: [PATCH] POM Changes @@ -6,7 +6,7 @@ Subject: [PATCH] POM Changes Basic changes to the build system which mark the artifact as Spigot, and the necessary code changes to ensure proper functionality. Also disables the auto updater provided by CraftBukkit as it is useless to us. diff --git a/pom.xml b/pom.xml -index 7f49330..eb0128a 100644 +index 55e2603..1c4f56e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ @@ -51,7 +51,7 @@ index 7f49330..eb0128a 100644 ${project.version} jar compile -@@ -93,21 +105,39 @@ +@@ -88,21 +100,39 @@ @@ -94,7 +94,7 @@ index 7f49330..eb0128a 100644 compile gitdescribe -@@ -124,7 +154,7 @@ +@@ -119,7 +149,7 @@ org.bukkit.craftbukkit.Main CraftBukkit @@ -103,7 +103,7 @@ index 7f49330..eb0128a 100644 Bukkit Team Bukkit ${api.version} -@@ -169,7 +199,7 @@ +@@ -164,7 +194,7 @@ org.codehaus.mojo.signature diff --git a/CraftBukkit-Patches/0006-Better-Chunk-Tick-Selection.patch b/CraftBukkit-Patches/0006-Better-Chunk-Tick-Selection.patch index 6f4f93112..40a9f81fc 100644 --- a/CraftBukkit-Patches/0006-Better-Chunk-Tick-Selection.patch +++ b/CraftBukkit-Patches/0006-Better-Chunk-Tick-Selection.patch @@ -1,4 +1,4 @@ -From 47268e1d09430b441ffbd123d6cab9b2da8c9bda Mon Sep 17 00:00:00 2001 +From 33973c35cda51ba40c37a81cd5772b3003b95c8b Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:56:02 +1000 Subject: [PATCH] Better Chunk Tick Selection @@ -112,10 +112,10 @@ index 345ede9..bed457a 100644 this.methodProfiler.b(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 32bf7ff..383a491 100644 +index 9f96e11..f4d313e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -343,12 +343,15 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -344,12 +344,15 @@ public class WorldServer extends World implements IAsyncTaskHandler { protected void h() { super.h(); if (this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { @@ -134,7 +134,7 @@ index 32bf7ff..383a491 100644 } } else { -@@ -360,9 +363,21 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -361,9 +364,21 @@ public class WorldServer extends World implements IAsyncTaskHandler { // ChunkCoordIntPair chunkcoordintpair1 = (ChunkCoordIntPair) iterator1.next(); // int k = chunkcoordintpair1.x * 16; // int l = chunkcoordintpair1.z * 16; @@ -159,7 +159,7 @@ index 32bf7ff..383a491 100644 int k = chunkX * 16; int l = chunkZ * 16; -@@ -456,6 +471,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -457,6 +472,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { } } diff --git a/CraftBukkit-Patches/0011-View-Distance.patch b/CraftBukkit-Patches/0011-View-Distance.patch index 68538210e..4cf49455f 100644 --- a/CraftBukkit-Patches/0011-View-Distance.patch +++ b/CraftBukkit-Patches/0011-View-Distance.patch @@ -1,4 +1,4 @@ -From 379a48509beb86d658aad372cde149f162da4277 Mon Sep 17 00:00:00 2001 +From b0d1021f4563af84588befe541738357b38a8cbb Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:52:41 +1100 Subject: [PATCH] View Distance @@ -22,10 +22,10 @@ index 688d6f0..abb24c8 100644 public WorldServer a() { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 383a491..a3c3c78 100644 +index f4d313e..08b21a5 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -60,7 +60,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -61,7 +61,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { // CraftBukkit end this.server = minecraftserver; this.tracker = new EntityTracker(this); diff --git a/CraftBukkit-Patches/0012-Spigot-Timings.patch b/CraftBukkit-Patches/0012-Spigot-Timings.patch index add9a10ef..0170823b7 100644 --- a/CraftBukkit-Patches/0012-Spigot-Timings.patch +++ b/CraftBukkit-Patches/0012-Spigot-Timings.patch @@ -1,4 +1,4 @@ -From 0db746ad5cbf69d3f04721e57e4371d9af9af713 Mon Sep 17 00:00:00 2001 +From 6b26c0f937b54831297537d4753d9cc6d3acdbcb Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 10 Jan 2013 00:18:11 -0500 Subject: [PATCH] Spigot Timings @@ -529,10 +529,10 @@ index a67736a..bf4c758 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a3c3c78..6ed7078 100644 +index 08b21a5..af4a551 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -209,10 +209,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -210,10 +210,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { // CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals long time = this.worldData.getTime(); if (this.getGameRules().getBoolean("doMobSpawning") && this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) { @@ -547,7 +547,7 @@ index a3c3c78..6ed7078 100644 this.methodProfiler.c("chunkSource"); this.chunkProvider.unloadChunks(); int j = this.a(1.0F); -@@ -226,21 +229,34 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -227,21 +230,34 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.worldData.setDayTime(this.worldData.getDayTime() + 1L); } diff --git a/CraftBukkit-Patches/0055-Fire-PreLogin-Events-in-Offline-Mode.patch b/CraftBukkit-Patches/0055-Fire-PreLogin-Events-in-Offline-Mode.patch index 72a10afbf..c4711c27f 100644 --- a/CraftBukkit-Patches/0055-Fire-PreLogin-Events-in-Offline-Mode.patch +++ b/CraftBukkit-Patches/0055-Fire-PreLogin-Events-in-Offline-Mode.patch @@ -1,11 +1,11 @@ -From aefb2679c827a044b2b9d8522b6b0040de3f727f Mon Sep 17 00:00:00 2001 +From 70a5f335afc7120e0a0ef56dbeb97b90fd0805e8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 18 Dec 2013 13:32:10 +1100 Subject: [PATCH] Fire PreLogin Events in Offline Mode diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 50beec2..42905fd 100644 +index 50beec2..9bfb5a2 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -13,6 +13,7 @@ import java.util.Arrays; @@ -40,13 +40,14 @@ index 50beec2..42905fd 100644 // CraftBukkit start - fire PlayerLoginEvent EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.i, hostname); -@@ -133,7 +147,14 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo +@@ -133,7 +147,15 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo this.g = LoginListener.EnumProtocolState.KEY; this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e)); } else { - this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; + // Spigot start + try { ++ initUUID(); + new LoginHandler().fireEvents(); + } catch (Exception ex) { + disconnect("Failed to verify username!"); @@ -56,7 +57,7 @@ index 50beec2..42905fd 100644 } } -@@ -162,6 +183,40 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo +@@ -162,6 +184,40 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo return; } @@ -97,7 +98,7 @@ index 50beec2..42905fd 100644 String playerName = i.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); java.util.UUID uniqueId = i.getId(); -@@ -196,34 +251,9 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo +@@ -196,34 +252,9 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo // CraftBukkit end LoginListener.c.info("UUID of player " + LoginListener.this.i.getName() + " is " + LoginListener.this.i.getId()); LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; diff --git a/CraftBukkit-Patches/0144-Fix-Corrupted-Trapped-Chest.patch b/CraftBukkit-Patches/0144-Fix-Corrupted-Trapped-Chest.patch index 5bc96843d..baf48dd59 100644 --- a/CraftBukkit-Patches/0144-Fix-Corrupted-Trapped-Chest.patch +++ b/CraftBukkit-Patches/0144-Fix-Corrupted-Trapped-Chest.patch @@ -1,4 +1,4 @@ -From f48c765fc57be686f7d779a91d68034027fc9d00 Mon Sep 17 00:00:00 2001 +From 8847d9167368c6536609a0bfad76e1bd1b46613a Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 15 Aug 2014 00:56:41 -0400 Subject: [PATCH] Fix Corrupted Trapped Chest @@ -9,10 +9,10 @@ If a Trapped Chest gets its Tile Entity corrupted, it will crash the server ever This will now fix Trapped Chests too. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6ed7078..18b7f7d 100644 +index af4a551..6438c66 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -112,7 +112,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -113,7 +113,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { TileEntity result = super.getTileEntity(pos); Block type = getType(pos).getBlock(); diff --git a/CraftBukkit-Patches/0149-Limit-TNT-Detonations-per-tick.patch b/CraftBukkit-Patches/0149-Limit-TNT-Detonations-per-tick.patch index fd814b166..b33bcc44c 100644 --- a/CraftBukkit-Patches/0149-Limit-TNT-Detonations-per-tick.patch +++ b/CraftBukkit-Patches/0149-Limit-TNT-Detonations-per-tick.patch @@ -1,4 +1,4 @@ -From 3adf7c50ac25727434bd3aea045dcad4b4ec8cf5 Mon Sep 17 00:00:00 2001 +From aeedbb3daa60164b9ed25ee1d800a91d17a92ba4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Aug 2014 18:12:32 -0400 Subject: [PATCH] Limit TNT Detonations per tick @@ -19,10 +19,10 @@ index 10f6e47..2d22327 100644 this.lastY = this.locY; this.lastZ = this.locZ; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 18b7f7d..c820ee0 100644 +index 6438c66..1b26492 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -581,6 +581,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -582,6 +582,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } super.tickEntities();