Allow removal of packet handler
This commit is contained in:
parent
3ae27ccc55
commit
c76ad50136
@ -51,4 +51,14 @@ public class PacketHandler extends MiniPlugin
|
||||
verifier.addPacketHandler(packetHandler);
|
||||
}
|
||||
}
|
||||
|
||||
public void removePacketHandler(IPacketHandler packetHandler)
|
||||
{
|
||||
_packetHandlers.remove(packetHandler);
|
||||
|
||||
for (PacketVerifier verifier : _playerVerifierMap.values())
|
||||
{
|
||||
verifier.removePacketHandler(packetHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,4 +88,9 @@ public class PacketVerifier implements IPacketVerifier
|
||||
{
|
||||
_packetHandlers.add(packetHandler);
|
||||
}
|
||||
|
||||
public void removePacketHandler(IPacketHandler packetHandler)
|
||||
{
|
||||
_packetHandlers.remove(packetHandler);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user