From 6c693294bd2a0eca029b02df5653206c7b2f446c Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Tue, 3 Nov 2020 20:08:00 +0100 Subject: [PATCH] Remove unused methods in MAUtils. Slowly but surely, we're getting rid of this abomination... --- .../com/garbagemule/MobArena/MAUtils.java | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/src/main/java/com/garbagemule/MobArena/MAUtils.java b/src/main/java/com/garbagemule/MobArena/MAUtils.java index 62e73d2..b29729b 100644 --- a/src/main/java/com/garbagemule/MobArena/MAUtils.java +++ b/src/main/java/com/garbagemule/MobArena/MAUtils.java @@ -21,7 +21,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -118,37 +117,6 @@ public class MAUtils } } - /** - * Convert a config-name to a proper spaced and capsed arena name. - * The input String is split around all underscores, and every part - * of the String array is properly capsed. - */ - public static String nameConfigToArena(String name) - { - String[] parts = name.split("_"); - if (parts.length == 1) { - return toCamelCase(parts[0]); - } - - String separator = " "; - StringBuffer buffy = new StringBuffer(name.length()); - for (String part : parts) { - buffy.append(toCamelCase(part)); - buffy.append(separator); - } - buffy.replace(buffy.length()-1, buffy.length(), ""); - - return buffy.toString(); - } - - /** - * Returns the input String with a capital first letter, and all the - * other letters become lower case. - */ - public static String toCamelCase(String name) { - return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase(); - } - /** * Turn a list into a space-separated string-representation of the list. */ @@ -189,22 +157,6 @@ public class MAUtils } public static String listToString(Collection list, JavaPlugin plugin) { return listToString(list, true, (MobArena) plugin); } - /** - * Returns a String-list version of a comma-separated list. - */ - public static List stringToList(String list) - { - List result = new LinkedList<>(); - if (list == null) return result; - - String[] parts = list.trim().split(","); - - for (String part : parts) - result.add(part.trim()); - - return result; - } - /** * Stand back, I'm going to try science! */