geforkt von SteamWar/BungeeCore
Code Cleanup
Dieser Commit ist enthalten in:
Ursprung
bd22287898
Commit
8708b694da
@ -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);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren