Allow for spacing in COMMAND[] Action

This commit is contained in:
funkystudios authored and gravitylow committed 2014-01-26 20:14:58 -05:00
1 parent 8b38c7d1e6
commit 9abc2c8fe8
1 file changed
+5 -6
@@ -64,12 +64,11 @@ public class Group {
public static Group load(String string) {
try {
if (string.split(":").length == 4) {
string = Utilities.removeWhitespace(string);
String name = string.split(":")[0];
int level = Integer.parseInt(string.split(":")[1]);
String color = string.split(":")[2];
List<String> actions = Arrays.asList(string.split(":")[3].split(","));
if (string.split(" : ").length == 4) {
String name = string.split(" : ")[0];
int level = Integer.parseInt(string.split(" : ")[1]);
String color = string.split(" : ")[2];
List<String> actions = Arrays.asList(string.split(" : ")[3].split(","));
return new Group(name, level, color, actions);
} else {
throw new Exception();