diff options
author | ementalo <ementalodev@gmx.co.uk> | 2012-04-13 14:49:15 +0100 |
---|---|---|
committer | ementalo <ementalodev@gmx.co.uk> | 2012-04-13 14:49:15 +0100 |
commit | 5b5df254d554f6288a496023abc3a32d6a628ee4 (patch) | |
tree | e041af8ecfd9d9dd869480763f244451400ea7cf | |
parent | bbd2c53dd813c8acc10dd9d2a56d93f3b227c10f (diff) | |
download | Essentials-5b5df254d554f6288a496023abc3a32d6a628ee4.tar Essentials-5b5df254d554f6288a496023abc3a32d6a628ee4.tar.gz Essentials-5b5df254d554f6288a496023abc3a32d6a628ee4.tar.lz Essentials-5b5df254d554f6288a496023abc3a32d6a628ee4.tar.xz Essentials-5b5df254d554f6288a496023abc3a32d6a628ee4.zip |
Don't kill tamed ocelots with killall Test #1921
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandkillall.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java index a455ccc20..d918eeffb 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java @@ -16,6 +16,7 @@ import org.bukkit.entity.HumanEntity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Monster; import org.bukkit.entity.NPC; +import org.bukkit.entity.Ocelot; import org.bukkit.entity.Player; import org.bukkit.entity.Slime; import org.bukkit.entity.Snowman; @@ -121,6 +122,13 @@ public class Commandkillall extends EssentialsCommand continue; } } + if(entity instanceof Ocelot) + { + if (((Ocelot)entity).isTamed()) + { + continue; + } + } if (animals) { if (entity instanceof Animals || entity instanceof NPC || entity instanceof Snowman || entity instanceof WaterMob) |