Rebuild patches from last few PRs

This commit is contained in:
md_5 2014-05-06 16:10:35 +10:00
parent 9525c226d3
commit 2031db9986
3 changed files with 26 additions and 26 deletions

View file

@ -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 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sun, 1 Dec 2013 18:18:41 +1100 Date: Sun, 1 Dec 2013 18:18:41 +1100
Subject: [PATCH] BungeeCord Support Subject: [PATCH] BungeeCord Support
Provides support for IP forwarding via BungeeCord. 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 diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index b98079c..ee24038 100644 index b98079c..ee24038 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java --- a/src/main/java/net/minecraft/server/HandshakeListener.java
@ -174,6 +155,25 @@ index 4c5d77e..cd9a8f5 100644
String s; String s;
if (this.j.isBanned(gameprofile) && !this.j.get(gameprofile).e()) { // Should be hasExpired 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 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 index 317e14f..dd80ab7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java

View file

@ -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 <git@md-5.net> From: md_5 <git@md-5.net>
Date: Mon, 14 Apr 2014 17:21:24 +1000 Date: Mon, 14 Apr 2014 17:21:24 +1000
Subject: [PATCH] Check for blank OfflinePlayer Names 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 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 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/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) { public OfflinePlayer getOfflinePlayer(String name) {
Validate.notNull(name, "Name cannot be null"); Validate.notNull(name, "Name cannot be null");

View file

@ -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 <git@md-5.net> From: md_5 <git@md-5.net>
Date: Sun, 20 Apr 2014 18:58:00 +1000 Date: Sun, 20 Apr 2014 18:58:00 +1000
Subject: [PATCH] Don't special case 'invalid' usernames for UUIDs. 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 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 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/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 { @@ -231,8 +231,6 @@ public final class CraftServer implements Server {
@ -17,7 +17,7 @@ index 7c265b5..a996677 100644
private final class BooleanWrapper { private final class BooleanWrapper {
private boolean value = true; 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"); 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 com.google.common.base.Preconditions.checkArgument( !org.apache.commons.lang.StringUtils.isBlank( name ), "Name cannot be blank" ); // Spigot