diff --git a/pom.xml b/pom.xml index 9306c74..7c481ba 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.artillexstudios AxTrade - 1.12.0 + 1.12.1 jar AxTrade diff --git a/src/main/java/com/artillexstudios/axtrade/hooks/currency/CoinsEngineHook.java b/src/main/java/com/artillexstudios/axtrade/hooks/currency/CoinsEngineHook.java index 353139b..2e0aac1 100644 --- a/src/main/java/com/artillexstudios/axtrade/hooks/currency/CoinsEngineHook.java +++ b/src/main/java/com/artillexstudios/axtrade/hooks/currency/CoinsEngineHook.java @@ -66,6 +66,7 @@ public class CoinsEngineHook implements CurrencyHook { return cf; } CoinsEngineAPI.addBalance(Bukkit.getPlayer(player), currency, amount); + cf.complete(true); return cf; } @@ -77,6 +78,7 @@ public class CoinsEngineHook implements CurrencyHook { return cf; } CoinsEngineAPI.removeBalance(Bukkit.getPlayer(player), currency, amount); + cf.complete(true); return cf; } } \ No newline at end of file diff --git a/src/main/java/com/artillexstudios/axtrade/lang/LanguageManager.java b/src/main/java/com/artillexstudios/axtrade/lang/LanguageManager.java index 102b00c..c6d134d 100644 --- a/src/main/java/com/artillexstudios/axtrade/lang/LanguageManager.java +++ b/src/main/java/com/artillexstudios/axtrade/lang/LanguageManager.java @@ -25,6 +25,7 @@ import static com.artillexstudios.axtrade.AxTrade.CONFIG; public class LanguageManager { private static Config translations; + private static final Gson gson = new GsonBuilder().create(); public static void reload() { final String lang = CONFIG.getString("language", "en_US").toLowerCase(); @@ -45,7 +46,6 @@ public class LanguageManager { try { final HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); - final Gson gson = new GsonBuilder().create(); final JsonObject object = gson.fromJson(response.body(), JsonObject.class); final String base64Content = object.get("content").getAsString();