Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
403165edf4
@ -341,7 +341,9 @@ public class SneakyAssassins extends SoloGame
|
|||||||
if (event.GetState() == GameState.End || event.GetState() == GameState.Dead)
|
if (event.GetState() == GameState.End || event.GetState() == GameState.Dead)
|
||||||
{
|
{
|
||||||
HandlerList.unregisterAll(_npcManager);
|
HandlerList.unregisterAll(_npcManager);
|
||||||
|
HandlerList.unregisterAll(_powerUpManager);
|
||||||
_npcManager = null;
|
_npcManager = null;
|
||||||
|
_powerUpManager = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,10 +112,6 @@ public class PowerUpManager implements Listener
|
|||||||
case Live:
|
case Live:
|
||||||
schedulePowerUpSpawn(20);
|
schedulePowerUpSpawn(20);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Dead:
|
|
||||||
HandlerList.unregisterAll(this);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,16 +131,6 @@ public class PowerUpManager implements Listener
|
|||||||
powerUp.onUpdate(event);
|
powerUp.onUpdate(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void deregisterSelf(UpdateEvent event)
|
|
||||||
{
|
|
||||||
if (event.getType() != UpdateType.TICK)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (_game.GetState() == GameState.Dead)
|
|
||||||
HandlerList.unregisterAll(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPowerUpProximity(UpdateEvent event)
|
public void onPowerUpProximity(UpdateEvent event)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user