diff --git a/src/main/java/com/georgev22/api/minecraft/MinecraftUtils.java b/src/main/java/com/georgev22/api/minecraft/MinecraftUtils.java index 3cf4e80..73c5b60 100644 --- a/src/main/java/com/georgev22/api/minecraft/MinecraftUtils.java +++ b/src/main/java/com/georgev22/api/minecraft/MinecraftUtils.java @@ -178,6 +178,30 @@ public static String stripColor(final String msg) { return newColl; } + /** + * Converts a String List that contains color codes to Color List + * + * @param list the String List that contains the color codes + * @return the new Color List with the colors of the input Color String List + */ + public static @NotNull List colorsStringListToColorList(@NotNull List list) { + return colorsStringListToColorList(list.toArray(new String[0])); + } + + /** + * Converts a String Array that contains color codes to Color List + * + * @param array the String Array that contains the color codes + * @return the new Color List with the colors of the input Color String Array + */ + public static @NotNull List colorsStringListToColorList(String @NotNull ... array) { + List colorList = Lists.newArrayList(); + for (String str : array) { + colorList.add(Color.from(str)); + } + return colorList; + } + public static @NotNull List stripColor(final List coll) { Validate.notNull(coll, "The string collection can't be null!"); Validate.noNullElements(coll, "The string collection can't have null elements!"); diff --git a/src/main/java/com/georgev22/api/utilities/Utils.java b/src/main/java/com/georgev22/api/utilities/Utils.java index 54d3df3..346e165 100644 --- a/src/main/java/com/georgev22/api/utilities/Utils.java +++ b/src/main/java/com/georgev22/api/utilities/Utils.java @@ -1,7 +1,6 @@ package com.georgev22.api.utilities; import com.georgev22.api.maps.HashObjectMap; -import com.georgev22.api.minecraft.colors.Color; import com.georgev22.api.maps.ObjectMap; import com.georgev22.api.maps.TreeObjectMap; import com.google.common.collect.Lists; @@ -550,30 +549,6 @@ public static T deserialize(@NotNull String string, @NotNull Type type) { return map; } - /** - * Converts a String List that contains color codes to Color List - * - * @param list the String List that contains the color codes - * @return the new Color List with the colors of the input Color String List - */ - public static @NotNull List colorsStringListToColorList(@NotNull List list) { - return colorsStringListToColorList(list.toArray(new String[0])); - } - - /** - * Converts a String Array that contains color codes to Color List - * - * @param array the String Array that contains the color codes - * @return the new Color List with the colors of the input Color String Array - */ - public static @NotNull List colorsStringListToColorList(String @NotNull ... array) { - List colorList = Lists.newArrayList(); - for (String str : array) { - colorList.add(Color.from(str)); - } - return colorList; - } - /** * Generates a specific amount of random HEX colors *