geforkt von SteamWar/BungeeCore
Fix Teamserver integration
Dieser Commit ist enthalten in:
Ursprung
3e315ece3b
Commit
4a9ba9554a
@ -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();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren