From 35048d22f59ae7e5775f397458c9a2c85873201f Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Mon, 7 Apr 2014 00:42:16 +0100 Subject: [PATCH] Pass the offline/bungee uuid to PreLogin events (Closes #147) --- ...ch => 0060-Clear-Flower-Pot-on-Drop.patch} | 2 +- ...chunks-not-being-sent-to-the-client.patch} | 2 +- ...patch => 0062-Fix-Broken-Async-Chat.patch} | 2 +- ...ortation-of-Vehicles-and-Passengers.patch} | 4 +- ...emove-OS-X-Special-Chars-from-Signs.patch} | 4 +- ...fuscator.patch => 0065-Orebfuscator.patch} | 2 +- ....patch => 0066-Optimize-DataWatcher.patch} | 2 +- ...ire-PreLogin-Events-in-Offline-Mode.patch} | 42 ++++++++++++++--- ...rt.patch => 0068-BungeeCord-Support.patch} | 45 +++++++++---------- ...isabling-Zombie-Villager-Aggression.patch} | 2 +- ...onfigurable-Amount-of-Netty-Threads.patch} | 4 +- ...ch => 0071-Prevent-Mineshaft-Saving.patch} | 2 +- 12 files changed, 68 insertions(+), 45 deletions(-) rename CraftBukkit-Patches/{0061-Clear-Flower-Pot-on-Drop.patch => 0060-Clear-Flower-Pot-on-Drop.patch} (92%) rename CraftBukkit-Patches/{0062-Fix-some-chunks-not-being-sent-to-the-client.patch => 0061-Fix-some-chunks-not-being-sent-to-the-client.patch} (95%) rename CraftBukkit-Patches/{0063-Fix-Broken-Async-Chat.patch => 0062-Fix-Broken-Async-Chat.patch} (95%) rename CraftBukkit-Patches/{0064-Allow-Teleportation-of-Vehicles-and-Passengers.patch => 0063-Allow-Teleportation-of-Vehicles-and-Passengers.patch} (93%) rename CraftBukkit-Patches/{0065-Remove-OS-X-Special-Chars-from-Signs.patch => 0064-Remove-OS-X-Special-Chars-from-Signs.patch} (90%) rename CraftBukkit-Patches/{0066-Orebfuscator.patch => 0065-Orebfuscator.patch} (99%) rename CraftBukkit-Patches/{0067-Optimize-DataWatcher.patch => 0066-Optimize-DataWatcher.patch} (98%) rename CraftBukkit-Patches/{0071-Fire-PreLogin-Events-in-Offline-Mode.patch => 0067-Fire-PreLogin-Events-in-Offline-Mode.patch} (80%) rename CraftBukkit-Patches/{0060-BungeeCord-Support.patch => 0068-BungeeCord-Support.patch} (84%) rename CraftBukkit-Patches/{0068-Allow-Disabling-Zombie-Villager-Aggression.patch => 0069-Allow-Disabling-Zombie-Villager-Aggression.patch} (97%) rename CraftBukkit-Patches/{0069-Configurable-Amount-of-Netty-Threads.patch => 0070-Configurable-Amount-of-Netty-Threads.patch} (97%) rename CraftBukkit-Patches/{0070-Prevent-Mineshaft-Saving.patch => 0071-Prevent-Mineshaft-Saving.patch} (93%) diff --git a/CraftBukkit-Patches/0061-Clear-Flower-Pot-on-Drop.patch b/CraftBukkit-Patches/0060-Clear-Flower-Pot-on-Drop.patch similarity index 92% rename from CraftBukkit-Patches/0061-Clear-Flower-Pot-on-Drop.patch rename to CraftBukkit-Patches/0060-Clear-Flower-Pot-on-Drop.patch index a3457b6..729f56d 100644 --- a/CraftBukkit-Patches/0061-Clear-Flower-Pot-on-Drop.patch +++ b/CraftBukkit-Patches/0060-Clear-Flower-Pot-on-Drop.patch @@ -1,4 +1,4 @@ -From 084fa4da5aa714cbec570c3268a26cd1545e2dd8 Mon Sep 17 00:00:00 2001 +From 5dee6f66cd4e91d2c1c643ee16964351269f2f18 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 3 Dec 2013 11:07:48 +1100 Subject: [PATCH] Clear Flower Pot on Drop diff --git a/CraftBukkit-Patches/0062-Fix-some-chunks-not-being-sent-to-the-client.patch b/CraftBukkit-Patches/0061-Fix-some-chunks-not-being-sent-to-the-client.patch similarity index 95% rename from CraftBukkit-Patches/0062-Fix-some-chunks-not-being-sent-to-the-client.patch rename to CraftBukkit-Patches/0061-Fix-some-chunks-not-being-sent-to-the-client.patch index 6bb0393..93612ab 100644 --- a/CraftBukkit-Patches/0062-Fix-some-chunks-not-being-sent-to-the-client.patch +++ b/CraftBukkit-Patches/0061-Fix-some-chunks-not-being-sent-to-the-client.patch @@ -1,4 +1,4 @@ -From 02e581fff0d1daa9931f52c8ed644ecef8054f3a Mon Sep 17 00:00:00 2001 +From 0ed66ccec3c2472717d49a37ebd8c22b1e57fc38 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Mon, 2 Dec 2013 23:42:09 +0000 Subject: [PATCH] Fix some chunks not being sent to the client diff --git a/CraftBukkit-Patches/0063-Fix-Broken-Async-Chat.patch b/CraftBukkit-Patches/0062-Fix-Broken-Async-Chat.patch similarity index 95% rename from CraftBukkit-Patches/0063-Fix-Broken-Async-Chat.patch rename to CraftBukkit-Patches/0062-Fix-Broken-Async-Chat.patch index fb44025..55f703e 100644 --- a/CraftBukkit-Patches/0063-Fix-Broken-Async-Chat.patch +++ b/CraftBukkit-Patches/0062-Fix-Broken-Async-Chat.patch @@ -1,4 +1,4 @@ -From 7b361009b21908c445791bc650eef71dcd35e468 Mon Sep 17 00:00:00 2001 +From 5743f6c6a8179d530e15ea8aa883ab42c7a3aa68 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 5 Dec 2013 13:55:53 +1100 Subject: [PATCH] Fix Broken Async Chat diff --git a/CraftBukkit-Patches/0064-Allow-Teleportation-of-Vehicles-and-Passengers.patch b/CraftBukkit-Patches/0063-Allow-Teleportation-of-Vehicles-and-Passengers.patch similarity index 93% rename from CraftBukkit-Patches/0064-Allow-Teleportation-of-Vehicles-and-Passengers.patch rename to CraftBukkit-Patches/0063-Allow-Teleportation-of-Vehicles-and-Passengers.patch index b382a77..8af2c47 100644 --- a/CraftBukkit-Patches/0064-Allow-Teleportation-of-Vehicles-and-Passengers.patch +++ b/CraftBukkit-Patches/0063-Allow-Teleportation-of-Vehicles-and-Passengers.patch @@ -1,11 +1,11 @@ -From 015c23123158d752c654b696b44c42bb32cf514d Mon Sep 17 00:00:00 2001 +From ef522cef52d46863be10da19322970154d9075ea Mon Sep 17 00:00:00 2001 From: ItsHarry Date: Thu, 5 Dec 2013 21:58:11 +0100 Subject: [PATCH] Allow Teleportation of Vehicles and Passengers diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9bc708e..76e5643 100644 +index 03d6d36..b14098a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -453,9 +453,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/CraftBukkit-Patches/0065-Remove-OS-X-Special-Chars-from-Signs.patch b/CraftBukkit-Patches/0064-Remove-OS-X-Special-Chars-from-Signs.patch similarity index 90% rename from CraftBukkit-Patches/0065-Remove-OS-X-Special-Chars-from-Signs.patch rename to CraftBukkit-Patches/0064-Remove-OS-X-Special-Chars-from-Signs.patch index 923ebcc..1967eec 100644 --- a/CraftBukkit-Patches/0065-Remove-OS-X-Special-Chars-from-Signs.patch +++ b/CraftBukkit-Patches/0064-Remove-OS-X-Special-Chars-from-Signs.patch @@ -1,11 +1,11 @@ -From db1bb9c68c937ff426aa387951cea91ec97ba269 Mon Sep 17 00:00:00 2001 +From f83fcc664288a21eba0fba320a098f6dd57575dc Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 8 Dec 2013 16:52:42 +1100 Subject: [PATCH] Remove OS X Special Chars from Signs diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1ea7e4a..248d48e 100644 +index 4c509b6..213183d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1584,6 +1584,7 @@ public class PlayerConnection implements PacketPlayInListener { diff --git a/CraftBukkit-Patches/0066-Orebfuscator.patch b/CraftBukkit-Patches/0065-Orebfuscator.patch similarity index 99% rename from CraftBukkit-Patches/0066-Orebfuscator.patch rename to CraftBukkit-Patches/0065-Orebfuscator.patch index 0ae68b4..f48e9c5 100644 --- a/CraftBukkit-Patches/0066-Orebfuscator.patch +++ b/CraftBukkit-Patches/0065-Orebfuscator.patch @@ -1,4 +1,4 @@ -From 149f988a0165f036934d7f0fd527404b5a53a224 Mon Sep 17 00:00:00 2001 +From f9c86f4865d4330baea6630e32bbd41bd005ffa8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator diff --git a/CraftBukkit-Patches/0067-Optimize-DataWatcher.patch b/CraftBukkit-Patches/0066-Optimize-DataWatcher.patch similarity index 98% rename from CraftBukkit-Patches/0067-Optimize-DataWatcher.patch rename to CraftBukkit-Patches/0066-Optimize-DataWatcher.patch index bca57af..3aa4159 100644 --- a/CraftBukkit-Patches/0067-Optimize-DataWatcher.patch +++ b/CraftBukkit-Patches/0066-Optimize-DataWatcher.patch @@ -1,4 +1,4 @@ -From c05b40f1087cf9c762825ccf6c0e01e3d528bc9d Mon Sep 17 00:00:00 2001 +From 59714a94a25306d1f88a85331f32a64d1875302d Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 13 Dec 2013 11:45:47 +1100 Subject: [PATCH] Optimize DataWatcher diff --git a/CraftBukkit-Patches/0071-Fire-PreLogin-Events-in-Offline-Mode.patch b/CraftBukkit-Patches/0067-Fire-PreLogin-Events-in-Offline-Mode.patch similarity index 80% rename from CraftBukkit-Patches/0071-Fire-PreLogin-Events-in-Offline-Mode.patch rename to CraftBukkit-Patches/0067-Fire-PreLogin-Events-in-Offline-Mode.patch index e2934a1..e6861aa 100644 --- a/CraftBukkit-Patches/0071-Fire-PreLogin-Events-in-Offline-Mode.patch +++ b/CraftBukkit-Patches/0067-Fire-PreLogin-Events-in-Offline-Mode.patch @@ -1,14 +1,40 @@ -From d95c3ac45bb9a2ce9fbe9e241d64e8a1ea467a9a Mon Sep 17 00:00:00 2001 +From 731f42f442109e046706fe7c92d9e71359eadc99 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 efba029..6f35aa0 100644 +index dddd9aa..0d82e7d 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -108,7 +108,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -59,12 +59,25 @@ public class LoginListener implements PacketLoginInListener { + } + } + ++ // Spigot start ++ public void initUUID() ++ { ++ String uuid = UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + this.i.getName() ).getBytes( Charsets.UTF_8 ) ).toString().replaceAll( "-", "" ); ++ ++ this.i = new GameProfile( uuid, this.i.getName() ); ++ } ++ // Spigot end ++ + public void c() { ++ // Spigot start - Moved to initUUID ++ /* + if (!this.i.isComplete()) { + UUID uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + this.i.getName()).getBytes(Charsets.UTF_8)); + + this.i = new GameProfile(uuid.toString().replaceAll("-", ""), this.i.getName()); + } ++ */ ++ // Spigot end + + // CraftBukkit start - fire PlayerLoginEvent + EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.i, this.hostname); +@@ -99,7 +112,7 @@ public class LoginListener implements PacketLoginInListener { this.g = EnumProtocolState.KEY; this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.J().getPublic(), this.e), new GenericFutureListener[0]); } else { @@ -18,18 +44,20 @@ index efba029..6f35aa0 100644 } diff --git a/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java b/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java -index 496b7c9..766b8c7 100644 +index 496b7c9..fe4502a 100644 --- a/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java +++ b/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java -@@ -22,48 +22,20 @@ class ThreadPlayerLookupUUID extends Thread { +@@ -22,48 +22,22 @@ class ThreadPlayerLookupUUID extends Thread { public void run() { try { + // Spigot Start + if ( !LoginListener.b( this.a ).getOnlineMode() ) + { ++ a.initUUID(); + fireLoginEvents(); -+ LoginListener.a(this.a, EnumProtocolState.READY_TO_ACCEPT); ++ LoginListener.e().info( "UUID of player " + LoginListener.d( this.a ).getName() + " is " + LoginListener.d( this.a ).getId() ); ++ LoginListener.a( this.a, EnumProtocolState.READY_TO_ACCEPT ); + return; + } + // Spigot End @@ -81,7 +109,7 @@ index 496b7c9..766b8c7 100644 LoginListener.e().info("UUID of player " + LoginListener.d(this.a).getName() + " is " + LoginListener.d(this.a).getId()); LoginListener.a(this.a, EnumProtocolState.READY_TO_ACCEPT); } else { -@@ -80,4 +52,45 @@ class ThreadPlayerLookupUUID extends Thread { +@@ -80,4 +54,45 @@ class ThreadPlayerLookupUUID extends Thread { // CraftBukkit end } } diff --git a/CraftBukkit-Patches/0060-BungeeCord-Support.patch b/CraftBukkit-Patches/0068-BungeeCord-Support.patch similarity index 84% rename from CraftBukkit-Patches/0060-BungeeCord-Support.patch rename to CraftBukkit-Patches/0068-BungeeCord-Support.patch index 3c537c9..4c7c76d 100644 --- a/CraftBukkit-Patches/0060-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0068-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 4eb238db3911500b14a76a47e87c382e47febb58 Mon Sep 17 00:00:00 2001 +From c879accb1fd1f44194ec7161f5d212cc67455327 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 1 Dec 2013 18:18:41 +1100 Subject: [PATCH] BungeeCord Support @@ -33,31 +33,26 @@ index b80a760..42539b4 100644 } break; diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index dddd9aa..efba029 100644 +index 0d82e7d..07c1d4b 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -61,9 +61,18 @@ public class LoginListener implements PacketLoginInListener { - - public void c() { - if (!this.i.isComplete()) { -- UUID uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + this.i.getName()).getBytes(Charsets.UTF_8)); +@@ -62,8 +62,14 @@ public class LoginListener implements PacketLoginInListener { + // Spigot start + public void initUUID() + { +- String uuid = UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + this.i.getName() ).getBytes( Charsets.UTF_8 ) ).toString().replaceAll( "-", "" ); - -- this.i = new GameProfile(uuid.toString().replaceAll("-", ""), this.i.getName()); -+ // Spigot Start -+ String uuid; -+ if ( networkManager.spoofedUUID != null ) -+ { -+ uuid = networkManager.spoofedUUID; -+ } else -+ { -+ uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + this.i.getName()).getBytes(Charsets.UTF_8)).toString().replaceAll("-", ""); -+ } -+ -+ this.i = new GameProfile(uuid, this.i.getName()); -+ // Spigot End - } - - // CraftBukkit start - fire PlayerLoginEvent ++ String uuid; ++ if ( networkManager.spoofedUUID != null ) ++ { ++ uuid = networkManager.spoofedUUID; ++ } else ++ { ++ uuid = UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + this.i.getName() ).getBytes( Charsets.UTF_8 ) ).toString().replaceAll("-", ""); ++ } + this.i = new GameProfile( uuid, this.i.getName() ); + } + // Spigot end diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index 9ff1694..f6cca80 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java @@ -98,10 +93,10 @@ index 385dc0a..0d6ffef 100644 if (this.banByName.isBanned(gameprofile.getName())) { BanEntry banentry = (BanEntry) this.banByName.getEntries().get(gameprofile.getName()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 03d6d36..9bc708e 100644 +index b14098a..76e5643 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1282,6 +1282,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1289,6 +1289,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { { @Override diff --git a/CraftBukkit-Patches/0068-Allow-Disabling-Zombie-Villager-Aggression.patch b/CraftBukkit-Patches/0069-Allow-Disabling-Zombie-Villager-Aggression.patch similarity index 97% rename from CraftBukkit-Patches/0068-Allow-Disabling-Zombie-Villager-Aggression.patch rename to CraftBukkit-Patches/0069-Allow-Disabling-Zombie-Villager-Aggression.patch index a41a3e5..958729a 100644 --- a/CraftBukkit-Patches/0068-Allow-Disabling-Zombie-Villager-Aggression.patch +++ b/CraftBukkit-Patches/0069-Allow-Disabling-Zombie-Villager-Aggression.patch @@ -1,4 +1,4 @@ -From c06d0a4f26ee6c7790eca418f2a6127288c1ffcc Mon Sep 17 00:00:00 2001 +From e23d0235ac494adf917bb40cc56e7fda781bdf1c Mon Sep 17 00:00:00 2001 From: Dylan Xaldin Date: Thu, 12 Dec 2013 18:05:03 -0600 Subject: [PATCH] Allow Disabling Zombie Villager Aggression diff --git a/CraftBukkit-Patches/0069-Configurable-Amount-of-Netty-Threads.patch b/CraftBukkit-Patches/0070-Configurable-Amount-of-Netty-Threads.patch similarity index 97% rename from CraftBukkit-Patches/0069-Configurable-Amount-of-Netty-Threads.patch rename to CraftBukkit-Patches/0070-Configurable-Amount-of-Netty-Threads.patch index 90d2e8d..f51bf00 100644 --- a/CraftBukkit-Patches/0069-Configurable-Amount-of-Netty-Threads.patch +++ b/CraftBukkit-Patches/0070-Configurable-Amount-of-Netty-Threads.patch @@ -1,4 +1,4 @@ -From b00d4f7e51de301740148b6ce62e2630aa5dae50 Mon Sep 17 00:00:00 2001 +From fb40c05e1cf4f7b22e803545d37b8ed56547ffdb Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 13 Dec 2013 11:58:58 +1100 Subject: [PATCH] Configurable Amount of Netty Threads @@ -53,5 +53,5 @@ index 8bfffa5..b3278fd 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0070-Prevent-Mineshaft-Saving.patch b/CraftBukkit-Patches/0071-Prevent-Mineshaft-Saving.patch similarity index 93% rename from CraftBukkit-Patches/0070-Prevent-Mineshaft-Saving.patch rename to CraftBukkit-Patches/0071-Prevent-Mineshaft-Saving.patch index badd7ab..fb404d0 100644 --- a/CraftBukkit-Patches/0070-Prevent-Mineshaft-Saving.patch +++ b/CraftBukkit-Patches/0071-Prevent-Mineshaft-Saving.patch @@ -1,4 +1,4 @@ -From 93f9eba0f93d66a80285d823aea88e3ac1841237 Mon Sep 17 00:00:00 2001 +From 73eb7c52c528f150fe3c3c601c2ec53b4cf1e10b Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 13 Dec 2013 15:21:02 +1100 Subject: [PATCH] Prevent Mineshaft Saving