Why are the entity classes null so much
This commit is contained in:
parent
2185e3718a
commit
3a77245353
@ -34,16 +34,10 @@ public class DisguiseRadiusCommand extends DisguiseBaseCommand implements TabCom
|
|||||||
public DisguiseRadiusCommand(int maxRadius) {
|
public DisguiseRadiusCommand(int maxRadius) {
|
||||||
this.maxRadius = maxRadius;
|
this.maxRadius = maxRadius;
|
||||||
|
|
||||||
validClasses.add(Entity.class);
|
|
||||||
|
|
||||||
for (EntityType type : EntityType.values()) {
|
for (EntityType type : EntityType.values()) {
|
||||||
Class c = type.getEntityClass();
|
Class c = type.getEntityClass();
|
||||||
|
|
||||||
if (c == null) {
|
while (c != null && Entity.class.isAssignableFrom(c) && !validClasses.contains(c)) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (Entity.class.isAssignableFrom(c) && !validClasses.contains(c) && c != Entity.class) {
|
|
||||||
validClasses.add(c);
|
validClasses.add(c);
|
||||||
|
|
||||||
c = c.getSuperclass();
|
c = c.getSuperclass();
|
||||||
|
@ -88,11 +88,7 @@ public class TranslateFiller {
|
|||||||
for (EntityType type : EntityType.values()) {
|
for (EntityType type : EntityType.values()) {
|
||||||
Class c = type.getEntityClass();
|
Class c = type.getEntityClass();
|
||||||
|
|
||||||
if (c == null) {
|
while (c != null && Entity.class.isAssignableFrom(c) && !validClasses.contains(c)) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (Entity.class.isAssignableFrom(c) && !validClasses.contains(c) && c != Entity.class) {
|
|
||||||
validClasses.add(c);
|
validClasses.add(c);
|
||||||
|
|
||||||
c = c.getSuperclass();
|
c = c.getSuperclass();
|
||||||
|
Loading…
Reference in New Issue
Block a user