diff --git a/src/main/java/com/garbagemule/MobArena/ArenaImpl.java b/src/main/java/com/garbagemule/MobArena/ArenaImpl.java index 3f9b704..2319dd3 100644 --- a/src/main/java/com/garbagemule/MobArena/ArenaImpl.java +++ b/src/main/java/com/garbagemule/MobArena/ArenaImpl.java @@ -586,11 +586,11 @@ public class ArenaImpl implements Arena } } + MAUtils.sitPets(p); movePlayerToLobby(p); takeFee(p); storePlayerData(p, loc); removePotionEffects(p); - MAUtils.sitPets(p); setHealth(p, p.getMaxHealth()); p.setFoodLevel(20); if (settings.getBoolean("display-timer-as-level", false)) { diff --git a/src/main/java/com/garbagemule/MobArena/MAUtils.java b/src/main/java/com/garbagemule/MobArena/MAUtils.java index 264593d..2a45265 100644 --- a/src/main/java/com/garbagemule/MobArena/MAUtils.java +++ b/src/main/java/com/garbagemule/MobArena/MAUtils.java @@ -21,6 +21,7 @@ import org.bukkit.Material; import org.bukkit.Location; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.entity.Entity; +import org.bukkit.entity.Ocelot; import org.bukkit.entity.Player; import org.bukkit.entity.Wolf; import org.bukkit.inventory.ItemStack; @@ -113,12 +114,15 @@ public class MAUtils List entities = p.getNearbyEntities(80, 40, 80); for (Entity e : entities) { - if (!(e instanceof Wolf)) - continue; - - Wolf w = (Wolf) e; - if (w.isTamed() && w.getOwner() != null && w.getOwner().equals(p)) - w.setSitting(true); + if (e instanceof Wolf) { + Wolf w = (Wolf) e; + if (w.isTamed() && w.getOwner() != null && w.getOwner().equals(p)) + w.setSitting(true); + } else if (e instanceof Ocelot) { + Ocelot o = (Ocelot) e; + if (o.isTamed() && o.getOwner() != null && o.getOwner().equals(p)) + o.setSitting(true); + } } }