diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/ConfigBase.java b/core/src/main/java/com/seibel/distanthorizons/core/config/ConfigBase.java index 9d8e601a9..7b0ddd4e3 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/ConfigBase.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/ConfigBase.java @@ -52,7 +52,12 @@ public class ConfigBase */ public static final List> acceptableInputs = new ArrayList>() {{ add(Boolean.class); - add(Number.class); // Contains: Byte, Short, Int, Long, Double, Float0 + add(Byte.class); + add(Integer.class); + add(Double.class); + add(Short.class); + add(Long.class); + add(Float.class); add(String.class); // TODO[CONFIG]: Check the type of these is valid diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/types/ConfigEntry.java b/core/src/main/java/com/seibel/distanthorizons/core/config/types/ConfigEntry.java index a297bdb3e..6cc64d209 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/types/ConfigEntry.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/types/ConfigEntry.java @@ -207,7 +207,7 @@ public class ConfigEntry extends AbstractConfigType> implem if (this.configBase.disableMinMax) return 0; - if (value.getClass() != this.value.getClass()) // If the 2 variables aren't the same type then it will be invalid + if (value == null || this.value == null || value.getClass() != this.value.getClass()) // If the 2 variables aren't the same type then it will be invalid return 2; if (Number.class.isAssignableFrom(value.getClass())) { // Only check min max if it is a number if (max != null && NumberUtil.greaterThan((Number) value, (Number) max))