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:
@@ -10,6 +10,15 @@
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
import net.minecraft.util.StringUtil;
|
||||
@@ -62,7 +65,7 @@
|
||||
return new String[i];
|
||||
});
|
||||
|
||||
- if (server.usesAuthentication()) {
|
||||
+ if (server.usesAuthentication() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
|
||||
server.getProfileRepository().findProfilesByNames(astring, callback);
|
||||
} else {
|
||||
String[] astring1 = astring;
|
||||
@@ -85,7 +88,7 @@
|
||||
try {
|
||||
gameprofilebanlist.load();
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
+ ServerPlayer entity = new ServerPlayer(this.server, this.server.getLevel(Level.OVERWORLD), gameprofile, ClientInformation.createDefault());
|
||||
+ entity.transferCookieConnection = loginlistener;
|
||||
+ Player player = entity.getBukkitEntity();
|
||||
+ PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress());
|
||||
+ PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress());
|
||||
+
|
||||
+ if (this.bans.isBanned(gameprofile)) {
|
||||
+ UserBanListEntry gameprofilebanentry = (UserBanListEntry) this.bans.get(gameprofile);
|
||||
|
||||
Reference in New Issue
Block a user