diff --git a/src/main/java/one/oth3r/sit/utl/Utl.java b/src/main/java/one/oth3r/sit/utl/Utl.java index d39a95a..4470d4b 100644 --- a/src/main/java/one/oth3r/sit/utl/Utl.java +++ b/src/main/java/one/oth3r/sit/utl/Utl.java @@ -310,29 +310,6 @@ public class Utl { else return LangReader.of(key, args).getTxT(); } - public static class Enum { - - public static > T get(Object enumString, Class enumType) { - return get(enumString,enumType,enumType.getEnumConstants()[0]); - } - /** - * gets an enum from a string without returning null - * @param enumString the string of the enum - * @param enumType the class of enums - * @param defaultEnum the enum to return if a match isn't found - * @return an enum, if there isn't a match, it returns the first enum - */ - public static > T get(Object enumString, Class enumType, T defaultEnum) { - T[] values = enumType.getEnumConstants(); - for (T all : values) { - // check if there is a match for any of the enum names - if (enumString.toString().equals(all.name())) return all; - } - // if there's no match return the first entry - return defaultEnum; - } - } - /** * sends the settings packets to the server, if client & in game */