Fix ClassCastException when arrows are fired at MythicMobs mobs

This commit is contained in:
Daniel Saukel 2015-09-06 20:26:15 +02:00
parent f23665bc8b
commit 39179b1eec
2 changed files with 5 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package com.dre.dungeonsxl.signs;
import java.util.ArrayList; import java.util.ArrayList;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.World; import org.bukkit.World;
@ -162,7 +163,9 @@ public class SIGNMythicMobs extends DSign {
&& entity.getLocation().getY() <= spawnLoc.getY()+1 && entity.getLocation().getY() <= spawnLoc.getY()+1
&& entity.getLocation().getZ() >= spawnLoc.getZ()-1 && entity.getLocation().getZ() >= spawnLoc.getZ()-1
&& entity.getLocation().getZ() <= spawnLoc.getZ()+1 && entity.getLocation().getZ() <= spawnLoc.getZ()+1
&& !mythicMobs.contains(entity)) { && !mythicMobs.contains(entity)
&& entity.isCustomNameVisible()
&& !(entity instanceof Player)) {
mythicMob = (LivingEntity) entity; mythicMob = (LivingEntity) entity;
mythicMobs.add(entity); mythicMobs.add(entity);
return; return;

View File

@ -1,6 +1,6 @@
name: DungeonsXL name: DungeonsXL
main: com.dre.dungeonsxl.P main: com.dre.dungeonsxl.P
version: 0.9.6 version: 0.9.6-SNAPSHOT
author: Frank Baumann author: Frank Baumann
authors: [Frank Baumann, Milan Albrecht, Tobias Schmitz, Daniel Saukel] authors: [Frank Baumann, Milan Albrecht, Tobias Schmitz, Daniel Saukel]
website: http://www.dre2n.ml website: http://www.dre2n.ml