Skip to content

Commit

Permalink
Update ResourceType.java
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Aug 3, 2024
1 parent 772cdb1 commit 2cd4d15
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ public static String resourcesToJson(String receiver, boolean isNation, Map<Reso
}

public static Map<ResourceType, Double> parseResources(String arg) {
if (arg.endsWith("},")) {
arg = arg.substring(0, arg.length() - 1);
}
boolean allowBodmas = arg.contains("{") && StringMan.containsAny("+-*/^%", arg.replaceAll("\\{[^}]+}", ""));
return parseResources(arg, allowBodmas);
}
Expand Down

0 comments on commit 2cd4d15

Please sign in to comment.