Archiviert
1
0

Fix Teamserver integration

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
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;
}
if(event.getReceiver().getAddress().getHostName().contains("localhost")) {
return;
}
event.setCancelled(true);
if (!(event.getReceiver() instanceof ProxiedPlayer)) {
return;
}
BungeeCore.get().getProxy().getScheduler().schedule(BungeeCore.get(), () -> {
ProxiedPlayer player = (ProxiedPlayer) event.getReceiver();