Fix ClassCastException in HitQuestTracker

This commit is contained in:
cnr 2017-07-13 18:02:39 -07:00
parent 5cac083941
commit da08868206

View File

@ -1,13 +1,10 @@
package nautilus.game.arcade.quest; package nautilus.game.arcade.quest;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Item; import org.bukkit.entity.Item;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import mineplex.core.common.util.UtilItem;
import mineplex.core.quests.TriggerType; import mineplex.core.quests.TriggerType;
import mineplex.minecraft.game.core.damage.CustomDamageEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent;
@ -32,7 +29,7 @@ public class HitQuestTracker extends QuestTracker<Game>
if (!getGame().IsLive()) if (!getGame().IsLive())
return; return;
if (!(event.getEntity() instanceof Player)) if (!(event.getDamager() instanceof Player) || !(event.getEntity() instanceof Item))
return; return;