SteamWar/BungeeCore
Archiviert
13
2

Fix Teamserver integration
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-04-16 09:54:40 +02:00
Ursprung 3e315ece3b
Commit 4a9ba9554a

Datei anzeigen

@ -35,13 +35,18 @@ public class BrandListener extends BasicListener {
@EventHandler @EventHandler
public void onServerSwitch(PluginMessageEvent event) { public void onServerSwitch(PluginMessageEvent event) {
if(!event.getTag().equals("minecraft:brand") || !event.getTag().equals("MC|Brand")) { if(!event.getTag().equals("minecraft:brand") && !event.getTag().equals("MC|Brand")) {
return; return;
} }
if(event.getReceiver().getAddress().getHostName().contains("localhost")) { if(event.getReceiver().getAddress().getHostName().contains("localhost")) {
return; return;
} }
event.setCancelled(true);
if (!(event.getReceiver() instanceof ProxiedPlayer)) {
return;
}
BungeeCore.get().getProxy().getScheduler().schedule(BungeeCore.get(), () -> { BungeeCore.get().getProxy().getScheduler().schedule(BungeeCore.get(), () -> {
ProxiedPlayer player = (ProxiedPlayer) event.getReceiver(); ProxiedPlayer player = (ProxiedPlayer) event.getReceiver();