Fixed disguises leaving extra tags
Fixed memory problem in Arcade.
This commit is contained in:
parent
f3da99d539
commit
558231457c
@ -67,7 +67,12 @@ public class CustomTagFix extends MiniPlugin
|
||||
final String entityName = spawnPacket.l.getString(10);
|
||||
|
||||
if (spawnPacket.l.getByte(11) == 1 || spawnPacket.l.getByte(3) == 1)
|
||||
{
|
||||
{
|
||||
if (_entityMap.containsKey(spawnPacket.a))
|
||||
{
|
||||
verifier.bypassProcess(new PacketPlayOutEntityDestroy(_entityMap.get(spawnPacket.a)));
|
||||
}
|
||||
|
||||
int newId = _fakeIdCounter++;
|
||||
sendProtocolPackets(owner, spawnPacket.a, newId, entityName, verifier);
|
||||
_entityMap.put(spawnPacket.a, newId);
|
||||
|
@ -1172,7 +1172,7 @@ public abstract class Game implements Listener
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Collection<StatTracker<? extends Game>> getStatTrackers()
|
||||
{
|
||||
@ -1199,4 +1199,12 @@ public abstract class Game implements Listener
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void deRegisterStats()
|
||||
{
|
||||
for (StatTracker<? extends Game> tracker : _statTrackers)
|
||||
HandlerList.unregisterAll(tracker);
|
||||
|
||||
_statTrackers.clear();
|
||||
}
|
||||
}
|
||||
|
@ -269,6 +269,7 @@ public class GameManager implements Listener
|
||||
return;
|
||||
|
||||
event.GetGame().DeregisterKits();
|
||||
event.GetGame().deRegisterStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user