Merge pull request #41 from zml2008/fixes-1

Fix ClassCastException when an animal's tamer is an OfflinePlayer.
This commit is contained in:
Dion Williams 2012-07-26 04:22:50 -07:00
commit 510c520850

View File

@ -70,7 +70,7 @@ public abstract class ModifyworldListener implements Listener {
} else if (entity instanceof Tameable) {
Tameable animal = (Tameable) entity;
return "animal." + entityName + (animal.isTamed() ? "." + ((Player) animal.getOwner()).getName() : "");
return "animal." + entityName + (animal.isTamed() ? "." + animal.getOwner().getName() : "");
}