More entitytype class

This commit is contained in:
libraryaddict 2020-02-23 13:34:33 +13:00
parent 231c35c6e3
commit 2185e3718a
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4
2 changed files with 2 additions and 3 deletions

View File

@ -43,7 +43,7 @@ public class DisguiseRadiusCommand extends DisguiseBaseCommand implements TabCom
continue; continue;
} }
while (!validClasses.contains(c)) { while (Entity.class.isAssignableFrom(c) && !validClasses.contains(c) && c != Entity.class) {
validClasses.add(c); validClasses.add(c);
c = c.getSuperclass(); c = c.getSuperclass();

View File

@ -84,7 +84,6 @@ public class TranslateFiller {
TranslateType.DISGUISE_OPTIONS.save("adult", "Used as a shortcut for setBaby(false) when disguising an entity"); TranslateType.DISGUISE_OPTIONS.save("adult", "Used as a shortcut for setBaby(false) when disguising an entity");
ArrayList<Class> validClasses = new ArrayList<>(); ArrayList<Class> validClasses = new ArrayList<>();
validClasses.add(Entity.class);
for (EntityType type : EntityType.values()) { for (EntityType type : EntityType.values()) {
Class c = type.getEntityClass(); Class c = type.getEntityClass();
@ -93,7 +92,7 @@ public class TranslateFiller {
continue; continue;
} }
while (!validClasses.contains(c)) { while (Entity.class.isAssignableFrom(c) && !validClasses.contains(c) && c != Entity.class) {
validClasses.add(c); validClasses.add(c);
c = c.getSuperclass(); c = c.getSuperclass();