Check that animal owner is not null before name-based permission check

This commit is contained in:
zml 2013-08-28 20:27:00 -07:00
parent fe91279f9e
commit 0bfc70e98a
1 changed files with 3 additions and 3 deletions

View File

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