Cleanup proxy packet injector in Spigot too. FIXES 127

This commit is contained in:
Kristian S. Stangeland 2013-09-13 09:35:53 +02:00
parent 57ad8d8aaa
commit bed74f6ab6
2 changed files with 11 additions and 0 deletions

View File

@ -1113,6 +1113,8 @@ public final class PacketFilterManager implements ProtocolManager, ListenerInvok
// Remove packet handlers
if (packetInjector != null)
packetInjector.cleanupAll();
if (spigotInjector != null)
spigotInjector.cleanupAll();
// Remove server handler
playerInjection.close();

View File

@ -545,4 +545,13 @@ public class SpigotPacketInjector implements SpigotPacketListener {
else
throw new PlayerLoggedOutException("Player " + player + " has logged out");
}
/**
* Invoked when the server is cleaning up.
*/
public void cleanupAll() {
if (proxyPacketInjector != null) {
proxyPacketInjector.cleanupAll();
}
}
}