mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
Fix ClassCastException when arrows are fired at MythicMobs mobs
This commit is contained in:
parent
f23665bc8b
commit
39179b1eec
@ -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;
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user