diff --git a/src/main/java/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java b/src/main/java/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java index 65868f52..57313ee2 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java +++ b/src/main/java/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java @@ -43,7 +43,7 @@ public class DisguiseRadiusCommand extends DisguiseBaseCommand implements TabCom continue; } - while (!validClasses.contains(c)) { + while (Entity.class.isAssignableFrom(c) && !validClasses.contains(c) && c != Entity.class) { validClasses.add(c); c = c.getSuperclass(); diff --git a/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateFiller.java b/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateFiller.java index e41d2111..ed8d8f14 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateFiller.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateFiller.java @@ -84,7 +84,6 @@ public class TranslateFiller { TranslateType.DISGUISE_OPTIONS.save("adult", "Used as a shortcut for setBaby(false) when disguising an entity"); ArrayList validClasses = new ArrayList<>(); - validClasses.add(Entity.class); for (EntityType type : EntityType.values()) { Class c = type.getEntityClass(); @@ -93,7 +92,7 @@ public class TranslateFiller { continue; } - while (!validClasses.contains(c)) { + while (Entity.class.isAssignableFrom(c) && !validClasses.contains(c) && c != Entity.class) { validClasses.add(c); c = c.getSuperclass();