mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Allow for spacing in COMMAND[] Action
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user