diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/Tutorial.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/Tutorial.java index bd98eda37..afbaecaf6 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/Tutorial.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/Tutorial.java @@ -489,8 +489,9 @@ public abstract class Tutorial implements ScoreboardElement, Listener public void cleanup(Player player) { - if (get(player).CurrentTask != null) get(player).CurrentTask.cleanup(player); + if (get(player) != null && get(player).CurrentTask != null) + get(player).CurrentTask.cleanup(player); + _inTutorial.remove(player.getName()); } - } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/TutorialManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/TutorialManager.java index ad4dc21eb..0ccf063ae 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/TutorialManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/TutorialManager.java @@ -103,7 +103,8 @@ public class TutorialManager extends MiniPlugin @EventHandler public void quit(PlayerQuitEvent event) { - if (!isInTutorial(event.getPlayer())) return; + if (!isInTutorial(event.getPlayer())) + return; getTutorial(event.getPlayer()).cleanup(event.getPlayer()); } diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java index b15e327cd..74e3f7473 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java @@ -374,7 +374,7 @@ public class ConditionEffect implements Listener for (LivingEntity ent : Manager.GetActiveConditions().keySet()) { Condition condition = Manager.GetActiveCondition(ent, ConditionType.POISON_SHOCK); - if (condition == null) + if (condition == null || condition.GetSource() == null) continue; Manager.getDamagerManager().NewDamageEvent(ent, condition.GetSource(), null,