From 2031db9986fda66a65a96e0ed7e1d176643723af Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 6 May 2014 16:10:35 +1000 Subject: [PATCH] Rebuild patches from last few PRs --- .../0066-BungeeCord-Support.patch | 40 +++++++++---------- ...-Check-for-blank-OfflinePlayer-Names.patch | 6 +-- ...ial-case-invalid-usernames-for-UUIDs.patch | 6 +-- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/CraftBukkit-Patches/0066-BungeeCord-Support.patch b/CraftBukkit-Patches/0066-BungeeCord-Support.patch index 8f1eaf9169..30a74ef721 100644 --- a/CraftBukkit-Patches/0066-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0066-BungeeCord-Support.patch @@ -1,29 +1,10 @@ -From 48bc926d4d3fdac6b340fc955895128a66e9e196 Mon Sep 17 00:00:00 2001 +From 0e24dd43654d91417b154781cf244225845ae584 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 1 Dec 2013 18:18:41 +1100 Subject: [PATCH] BungeeCord Support Provides support for IP forwarding via BungeeCord. -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d160b96..06b1ee7 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -663,7 +663,13 @@ public final class CraftServer implements Server { - } - - public long getConnectionThrottle() { -- return this.configuration.getInt("settings.connection-throttle"); -+ // Spigot Start - Automatically set connection throttle for bungee configurations -+ if (org.spigotmc.SpigotConfig.bungee) { -+ return -1; -+ } else { -+ return this.configuration.getInt("settings.connection-throttle"); -+ } -+ // Spigot End - } - - public int getTicksPerAnimalSpawns() { diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java index b98079c..ee24038 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java @@ -174,6 +155,25 @@ index 4c5d77e..cd9a8f5 100644 String s; if (this.j.isBanned(gameprofile) && !this.j.get(gameprofile).e()) { // Should be hasExpired +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 6a556cf..92ae2fa 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -648,7 +648,13 @@ public final class CraftServer implements Server { + } + + public long getConnectionThrottle() { +- return this.configuration.getInt("settings.connection-throttle"); ++ // Spigot Start - Automatically set connection throttle for bungee configurations ++ if (org.spigotmc.SpigotConfig.bungee) { ++ return -1; ++ } else { ++ return this.configuration.getInt("settings.connection-throttle"); ++ } ++ // Spigot End + } + + public int getTicksPerAnimalSpawns() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 317e14f..dd80ab7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/CraftBukkit-Patches/0128-Check-for-blank-OfflinePlayer-Names.patch b/CraftBukkit-Patches/0128-Check-for-blank-OfflinePlayer-Names.patch index 26564a2442..96a62d00a9 100644 --- a/CraftBukkit-Patches/0128-Check-for-blank-OfflinePlayer-Names.patch +++ b/CraftBukkit-Patches/0128-Check-for-blank-OfflinePlayer-Names.patch @@ -1,14 +1,14 @@ -From fc6524f58752a840951b5a9f220d0347006807ba Mon Sep 17 00:00:00 2001 +From 51656df39d68c5d237d1af708dc29d6aded18902 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 14 Apr 2014 17:21:24 +1000 Subject: [PATCH] Check for blank OfflinePlayer Names diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 80a1eeb..7c265b5 100644 +index e673546..3183fc8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1319,6 +1319,7 @@ public final class CraftServer implements Server { +@@ -1325,6 +1325,7 @@ public final class CraftServer implements Server { public OfflinePlayer getOfflinePlayer(String name) { Validate.notNull(name, "Name cannot be null"); diff --git a/CraftBukkit-Patches/0136-Don-t-special-case-invalid-usernames-for-UUIDs.patch b/CraftBukkit-Patches/0136-Don-t-special-case-invalid-usernames-for-UUIDs.patch index eead4d9e50..2f156d3984 100644 --- a/CraftBukkit-Patches/0136-Don-t-special-case-invalid-usernames-for-UUIDs.patch +++ b/CraftBukkit-Patches/0136-Don-t-special-case-invalid-usernames-for-UUIDs.patch @@ -1,11 +1,11 @@ -From 5eace513ddcbb97a48d8f215ce3a49530cdbabae Mon Sep 17 00:00:00 2001 +From 2727691fd928aaac0e1fffac8a356e1246d890a0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 20 Apr 2014 18:58:00 +1000 Subject: [PATCH] Don't special case 'invalid' usernames for UUIDs. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7c265b5..a996677 100644 +index 3183fc8..06b1ee7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -231,8 +231,6 @@ public final class CraftServer implements Server { @@ -17,7 +17,7 @@ index 7c265b5..a996677 100644 private final class BooleanWrapper { private boolean value = true; -@@ -1321,11 +1319,6 @@ public final class CraftServer implements Server { +@@ -1327,11 +1325,6 @@ public final class CraftServer implements Server { Validate.notNull(name, "Name cannot be null"); com.google.common.base.Preconditions.checkArgument( !org.apache.commons.lang.StringUtils.isBlank( name ), "Name cannot be blank" ); // Spigot