mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-02-19 22:12:20 +01:00
Fix listeners removing each other (#2236)
This commit is contained in:
parent
4f0fe72add
commit
bba534d694
@ -306,6 +306,10 @@ public class PacketFilterManager implements ListenerInvoker, InternalManager {
|
||||
ListeningWhitelist outbound = listener.getSendingWhitelist();
|
||||
ListeningWhitelist inbound = listener.getReceivingWhitelist();
|
||||
|
||||
// Remove packets from the lists if they are not supposed to be in those lists
|
||||
inbound.getTypes().removeIf(type -> !type.isClient());
|
||||
outbound.getTypes().removeIf(type -> !type.isServer());
|
||||
|
||||
// verify plugin if needed
|
||||
if (this.shouldVerifyPlugin(outbound, inbound)) {
|
||||
this.printPluginWarnings(listener.getPlugin());
|
||||
|
Loading…
Reference in New Issue
Block a user