Fix Memory Leak (Credit: Ciph3r-Zer0)

This commit is contained in:
RayzsYT committed 2024-06-15 19:05:49 +02:00
1 parent 210910663e
commit 2fa582ef76
2 files changed
+4 -1

No files matched your search

@@ -85,7 +85,8 @@ public class BungeePacketAnalyzer {
}
public static void uninject(ProxiedPlayer player) {
PLAYER_MODIFIED.remove(player);
BungeePacketAnalyzer.PLAYER_INPUT_CACHE.remove(player);
BungeePacketAnalyzer.PLAYER_MODIFIED.remove(player);
if(BungeePacketAnalyzer.INJECTED_PLAYERS.containsKey(player)) {
Channel channel = BungeePacketAnalyzer.INJECTED_PLAYERS.get(player);
@@ -67,6 +67,8 @@ public class VelocityPacketAnalyzer {
}
public static void uninject(Player player) {
VelocityPacketAnalyzer.PLAYER_INPUT_CACHE.remove(player);
if(VelocityPacketAnalyzer.INJECTED_PLAYERS.containsKey(player)) {
Channel channel = VelocityPacketAnalyzer.INJECTED_PLAYERS.get(player);
if(channel != null) {