fix ConcurrentModificationException

This commit is contained in:
Ben 2016-03-15 00:21:15 +00:00
parent 864b12adbf
commit c556d7b3c3

View File

@ -353,19 +353,21 @@ public abstract class SiegeWeapon implements Listener
{
System.out.println("Killing: " + this.getClass().getSimpleName() + " [" + _uniqueId + "]");
CustomCleanup();
_comprisedOf.forEach(Entity::remove);
_entityMapping.clear();
_comprisedOf.clear();
_infoHologram.stop();
if (_collisionBox != null) _collisionBox.Destruct();
_siegeManager.dead(this);
_alive = false;
_siegeManager.runSync(() -> {
CustomCleanup();
_comprisedOf.forEach(Entity::remove);
_entityMapping.clear();
_comprisedOf.clear();
_infoHologram.stop();
if (_collisionBox != null) _collisionBox.Destruct();
_siegeManager.dead(this);
_alive = false;
});
HandlerList.unregisterAll(this);
}