Fix the pumpkin king being damaged during the cut scene

This commit is contained in:
Sam 2017-12-09 21:40:46 +00:00 committed by Alexander Meech
parent 1a2aaf7043
commit 9bc7ecf8ff

View File

@ -19,6 +19,7 @@ import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.core.utils.UtilVariant;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.games.christmasnew.ChristmasNew;
import nautilus.game.arcade.game.games.christmasnew.ChristmasNewAudio;
@ -198,4 +199,13 @@ class BossFight extends SectionChallenge
_host.CreatureAllowOverride = false;
}
@EventHandler
public void bossDamage(CustomDamageEvent event)
{
if (_boss != null && event.GetDamageeEntity().equals(_boss) && !_enabled)
{
event.SetCancelled("Cut scene");
}
}
}