Fix NPE in MountCannonGoal
This commit is contained in:
parent
5149043d14
commit
5652eb75cf
@ -33,7 +33,10 @@ public class MountCannonGoal extends ObjectiveGoal<AttackEnemyObjective>
|
|||||||
@Override
|
@Override
|
||||||
protected void clean(Player player, TutorialRegion region)
|
protected void clean(Player player, TutorialRegion region)
|
||||||
{
|
{
|
||||||
getObjective().getCannons().remove(player.getName()).kill();
|
// This cannon could be removed from the tutorial already in BlowUpWallGoal, we need to check if its null
|
||||||
|
Cannon cannon = getObjective().getCannons().remove(player.getName());
|
||||||
|
if (cannon != null)
|
||||||
|
cannon.kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user