From 231c35c6e3ae3b775236b9a8b4a1439ef5a56d76 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 23 Feb 2020 11:58:58 +1300 Subject: [PATCH] Skip null EntityTypes --- .../disguise/commands/DisguiseRadiusCommand.java | 4 ++++ .../disguise/utilities/translations/TranslateFiller.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java b/src/main/java/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java index 4a133f9f..65868f52 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java +++ b/src/main/java/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java @@ -39,6 +39,10 @@ public class DisguiseRadiusCommand extends DisguiseBaseCommand implements TabCom for (EntityType type : EntityType.values()) { Class c = type.getEntityClass(); + if (c == null) { + continue; + } + while (!validClasses.contains(c)) { validClasses.add(c); 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 fb844d29..e41d2111 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateFiller.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/translations/TranslateFiller.java @@ -89,6 +89,10 @@ public class TranslateFiller { for (EntityType type : EntityType.values()) { Class c = type.getEntityClass(); + if (c == null) { + continue; + } + while (!validClasses.contains(c)) { validClasses.add(c);