Fix MineStrike Issues (#222)

* Check if the costume is null before doing anything.

* Disable entity specing
This commit is contained in:
Sam 2016-09-30 04:37:41 +01:00 committed by Shaun Bennett
parent 81070eac62
commit 36c26c0b2c

View File

@ -158,6 +158,8 @@ public class Minestrike extends TeamGame
this.DontAllowOverfill = true;
this.AllowEntitySpectate = false;
_scoreObj = Scoreboard.getScoreboard().registerNewObjective("HP", "dummy");
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
@ -1053,7 +1055,12 @@ public class Minestrike extends TeamGame
return;
}
Manager.getCosmeticManager().getGadgetManager().getActive(event.getPlayer(), GadgetType.COSTUME).disable(event.getPlayer());
Gadget activeCostume = Manager.getCosmeticManager().getGadgetManager().getActive(event.getPlayer(), GadgetType.COSTUME);
if (activeCostume != null)
{
activeCostume.disable(event.getPlayer());
}
//Target Team
GameTeam targetTeam = null;