diff --git a/src/main/java/com/gmail/nossr50/skills/taming/Taming.java b/src/main/java/com/gmail/nossr50/skills/taming/Taming.java index 2f15da2dd..a6e312680 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/Taming.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/Taming.java @@ -1,7 +1,6 @@ package com.gmail.nossr50.skills.taming; import org.bukkit.EntityEffect; -import org.bukkit.OfflinePlayer; import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; @@ -71,24 +70,6 @@ public class Taming { wolf.playEffect(EntityEffect.WOLF_HEARTS); } - /** - * Get the name of a tameable animal's owner. - * - * @return the name of the animal's owner - */ - protected static String getOwnerName(Tameable beast) { - AnimalTamer tamer = beast.getOwner(); - - if (tamer instanceof Player) { - return ((Player) tamer).getName(); - } - else if (tamer instanceof OfflinePlayer) { - return ((OfflinePlayer) tamer).getName(); - } - - return "Unknown Master"; - } - protected static String getCallOfTheWildFailureMessage(EntityType type) { switch (type) { case OCELOT: diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java index 48e922e92..e45343127 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java @@ -133,7 +133,7 @@ public class TamingManager extends SkillManager { String message = LocaleLoader.getString("Combat.BeastLore") + " "; if (beast.isTamed()) { - message = message.concat(LocaleLoader.getString("Combat.BeastLoreOwner", Taming.getOwnerName(beast)) + " "); + message = message.concat(LocaleLoader.getString("Combat.BeastLoreOwner", beast.getOwner().getName()) + " "); } message = message.concat(LocaleLoader.getString("Combat.BeastLoreHealth", target.getHealth(), target.getMaxHealth()));