mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-16 10:35:32 +01:00
Fixed ocelots
This commit is contained in:
parent
6a461c1f5c
commit
80451d2137
@ -71,19 +71,17 @@ public abstract class ModifyworldListener implements Listener {
|
||||
}
|
||||
|
||||
protected String getEntityName(Entity entity) {
|
||||
String entityName = entity.toString().substring(5).toLowerCase();
|
||||
|
||||
if (entity instanceof Player) {
|
||||
return "player." + ((Player) entity).getName();
|
||||
} else if (entity instanceof Wolf) {
|
||||
Wolf wolf = (Wolf) entity;
|
||||
|
||||
if (wolf.isTamed() && wolf.getOwner() instanceof Player) {
|
||||
return "animal.wolf." + ((Player) wolf.getOwner()).getName();
|
||||
} else {
|
||||
return "animal.wolf";
|
||||
}
|
||||
} else if (entity instanceof Tameable) {
|
||||
Tameable animal = (Tameable) entity;
|
||||
|
||||
return "animal." + entityName+ (animal.isTamed() ? "." + ((Player) animal.getOwner()).getName() : "");
|
||||
}
|
||||
|
||||
String entityName = entity.toString().substring(5).toLowerCase();
|
||||
|
||||
EntityCategory category = EntityCategory.fromEntity(entity);
|
||||
|
||||
if (category == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user