Check that animal owner is not null before name-based permission check
This commit is contained in:
parent
fe91279f9e
commit
0bfc70e98a
|
@ -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() : "");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue