diff --git a/src/main/java/net/draycia/carbon/util/CarbonUtils.java b/src/main/java/net/draycia/carbon/util/CarbonUtils.java index e661608d..9d896771 100644 --- a/src/main/java/net/draycia/carbon/util/CarbonUtils.java +++ b/src/main/java/net/draycia/carbon/util/CarbonUtils.java @@ -51,6 +51,16 @@ public final class CarbonUtils { @NotNull private static final String[] colors; + static { + ArrayList colorList = new ArrayList<>(); + + for (NamedTextColor color : NamedTextColor.values()) { + colorList.add(color.toString()); + } + + colors = colorList.toArray(new String[0]); + } + @NotNull public static Component createComponent(@NotNull final Player player) { if (!FunctionalityConstants.HAS_HOVER_EVENT_METHOD) { @@ -157,7 +167,7 @@ public final class CarbonUtils { @NotNull public static Argument textColorArgument() { return new CustomArgument<>((input) -> { - TextColor color = parseColor(input); + TextColor color = parseColor(input); if (color == null) { throw new CustomArgument.CustomArgumentException("Invalid color for input (" + input + ")"); @@ -196,14 +206,4 @@ public final class CarbonUtils { throw new NotImplementedException("Not implemented yet."); } - static { - ArrayList colorList = new ArrayList<>(); - - for (NamedTextColor color : NamedTextColor.values()) { - colorList.add(color.toString()); - } - - colors = colorList.toArray(new String[0]); - } - } \ No newline at end of file diff --git a/src/main/java/net/draycia/carbon/util/Registry.java b/src/main/java/net/draycia/carbon/util/Registry.java index a4f93926..c1a369d1 100644 --- a/src/main/java/net/draycia/carbon/util/Registry.java +++ b/src/main/java/net/draycia/carbon/util/Registry.java @@ -9,7 +9,8 @@ public interface Registry { /** * Adds the specified key and value to the registry - * @param key The entry's key + * + * @param key The entry's key * @param value The value to insert * @return If successfully registered */ @@ -17,6 +18,7 @@ public interface Registry { /** * Gets the list of registered values + * * @return The list of registered values */ @NotNull @@ -24,6 +26,7 @@ public interface Registry { /** * Obtains an entry associated with the specified key + * * @param key The key for the entry * @return The entry associated with the key */