From 2cd4d156c4b632accd23acebc95b7eadcf04c404 Mon Sep 17 00:00:00 2001 From: test Date: Sun, 4 Aug 2024 06:59:26 +1000 Subject: [PATCH] Update ResourceType.java --- .../java/link/locutus/discord/apiv1/enums/ResourceType.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/link/locutus/discord/apiv1/enums/ResourceType.java b/src/main/java/link/locutus/discord/apiv1/enums/ResourceType.java index db6d3c6b..f84b2e0b 100644 --- a/src/main/java/link/locutus/discord/apiv1/enums/ResourceType.java +++ b/src/main/java/link/locutus/discord/apiv1/enums/ResourceType.java @@ -162,6 +162,9 @@ public static String resourcesToJson(String receiver, boolean isNation, Map 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); }