mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
fix: stop portal packets still being forwarded to the client
Thanks to rooter.rs for notifying me of these issues :) Multiple people made me aware of this one, but they were the first :D For details see https://roote.rs/posts/advancedportals/
This commit is contained in:
parent
258ede7501
commit
8fd11f85c4
@ -19,7 +19,10 @@ public class PluginMessageReceiver implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onMessageReceived(PluginMessageEvent event) {
|
||||
if(!event.getTag().equalsIgnoreCase(BungeeMessages.CHANNEL_NAME) || !(event.getSender() instanceof Server)) return;
|
||||
if(!event.getTag().equalsIgnoreCase(BungeeMessages.CHANNEL_NAME)) return;
|
||||
event.setCancelled(true);
|
||||
|
||||
if(!(event.getSender() instanceof Server)) return;
|
||||
|
||||
ByteArrayDataInput in = ByteStreams.newDataInput(event.getData());
|
||||
String subChannel = in.readUTF();
|
||||
@ -43,7 +46,5 @@ public class PluginMessageReceiver implements Listener {
|
||||
plugin.getProxy().getPluginManager().dispatchCommand(player, command);
|
||||
}
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user