BungeeCord Support

* Provides support for IP forwarding via BungeeCord.
* Treats Bungee as Online Mode.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2014-04-12 21:23:58 +10:00
parent 496995ccaa
commit 3d4c222263
11 changed files with 206 additions and 56 deletions

View File

@@ -803,7 +803,13 @@ public final class CraftServer implements Server {
@Override
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
}
@Override
@@ -1814,7 +1820,7 @@ public final class CraftServer implements Server {
if (result == null) {
GameProfile profile = null;
// Only fetch an online UUID in online mode
if (this.getOnlineMode()) {
if (this.getOnlineMode() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
// This is potentially blocking :(
profile = this.console.getProfileCache().get(name).orElse(null);
}