SteamWar/BungeeCore
Archiviert
13
2
Dieser Commit ist enthalten in:
Chaoscaot 2020-09-22 13:38:30 +02:00
Ursprung bd22287898
Commit 8708b694da

Datei anzeigen

@ -37,8 +37,10 @@ public class SpigotReceiver extends BasicListener {
public void onPluginMessage(PluginMessageEvent event) { public void onPluginMessage(PluginMessageEvent event) {
if(!event.getTag().equalsIgnoreCase("sw:bridge")) if(!event.getTag().equalsIgnoreCase("sw:bridge"))
return; return;
if(!event.getSender().getAddress().getHostName().equals("localhost")) if(!event.getSender().getAddress().getHostName().equals("localhost")){
event.setCancelled(true);
return; return;
}
ByteArrayDataInput in = ByteStreams.newDataInput(event.getData()); ByteArrayDataInput in = ByteStreams.newDataInput(event.getData());
Byte handler = in.readByte(); Byte handler = in.readByte();
handlerMap.get(handler).handle(in); handlerMap.get(handler).handle(in);