mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 22:16:03 +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) {
|
public static Group load(String string) {
|
||||||
try {
|
try {
|
||||||
if (string.split(":").length == 4) {
|
if (string.split(" : ").length == 4) {
|
||||||
string = Utilities.removeWhitespace(string);
|
String name = string.split(" : ")[0];
|
||||||
String name = string.split(":")[0];
|
int level = Integer.parseInt(string.split(" : ")[1]);
|
||||||
int level = Integer.parseInt(string.split(":")[1]);
|
String color = string.split(" : ")[2];
|
||||||
String color = string.split(":")[2];
|
List<String> actions = Arrays.asList(string.split(" : ")[3].split(","));
|
||||||
List<String> actions = Arrays.asList(string.split(":")[3].split(","));
|
|
||||||
return new Group(name, level, color, actions);
|
return new Group(name, level, color, actions);
|
||||||
} else {
|
} else {
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
|
|||||||
Reference in new issue
Block a user