Fixed bug with Posion effect NPE (Something in champs is adding a null source).
Fixed bug with Tutorial cleanup.
This commit is contained in:
parent
782026556e
commit
5b04a3223d
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user