mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-12-22 16:18:24 +01:00
Merge pull request #41 from zml2008/fixes-1
Fix ClassCastException when an animal's tamer is an OfflinePlayer.
This commit is contained in:
commit
510c520850
@ -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() : "");
|
||||
}
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ public abstract class ModifyworldListener implements Listener {
|
||||
if (obj == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
builder.append('.');
|
||||
builder.append(getObjectPermission(obj));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user