Skip to content

Commit

Permalink
Cleanup proxy packet injector in Spigot too. FIXES 127
Browse files Browse the repository at this point in the history
  • Loading branch information
aadnk committed Sep 13, 2013
1 parent 57ad8d8 commit bed74f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Expand Up @@ -1113,6 +1113,8 @@ public void close() {
// Remove packet handlers
if (packetInjector != null)
packetInjector.cleanupAll();
if (spigotInjector != null)
spigotInjector.cleanupAll();

// Remove server handler
playerInjection.close();
Expand Down
Expand Up @@ -545,4 +545,13 @@ void processPacket(Player player, Object mcPacket) throws IllegalAccessException
else
throw new PlayerLoggedOutException("Player " + player + " has logged out");
}

/**
* Invoked when the server is cleaning up.
*/
public void cleanupAll() {
if (proxyPacketInjector != null) {
proxyPacketInjector.cleanupAll();
}
}
}

0 comments on commit bed74f6

Please sign in to comment.