diff --git a/pom.xml b/pom.xml
index 13b5f53..ada781d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.artillexstudios
AxTrade
- 1.10.0
+ 1.10.1
jar
AxTrade
@@ -116,7 +116,7 @@
com.artillexstudios.axapi
axapi
- 1.4.396
+ 1.4.403
compile
all
diff --git a/src/main/java/com/artillexstudios/axtrade/AxTrade.java b/src/main/java/com/artillexstudios/axtrade/AxTrade.java
index 08a007e..b26416a 100644
--- a/src/main/java/com/artillexstudios/axtrade/AxTrade.java
+++ b/src/main/java/com/artillexstudios/axtrade/AxTrade.java
@@ -12,7 +12,6 @@ import com.artillexstudios.axapi.utils.FeatureFlags;
import com.artillexstudios.axapi.utils.MessageUtils;
import com.artillexstudios.axapi.utils.StringUtils;
import com.artillexstudios.axtrade.commands.Commands;
-import com.artillexstudios.axtrade.currencyconverter.CurrencyConverter;
import com.artillexstudios.axtrade.hooks.HookManager;
import com.artillexstudios.axtrade.lang.LanguageManager;
import com.artillexstudios.axtrade.listeners.EntityInteractListener;
@@ -54,7 +53,6 @@ public final class AxTrade extends AxPlugin {
CONFIG = new Config(new File(getDataFolder(), "config.yml"), getResource("config.yml"), GeneralSettings.builder().setUseDefaults(false).build(), LoaderSettings.builder().setAutoUpdate(true).build(), DumperSettings.DEFAULT, UpdaterSettings.builder().setKeepAll(true).setVersioning(new BasicVersioning("version")).build());
GUIS = new Config(new File(getDataFolder(), "guis.yml"), getResource("guis.yml"), GeneralSettings.builder().setUseDefaults(false).build(), LoaderSettings.builder().setAutoUpdate(true).build(), DumperSettings.DEFAULT, UpdaterSettings.builder().setKeepAll(true).setVersioning(new BasicVersioning("version")).build());
LANG = new Config(new File(getDataFolder(), "lang.yml"), getResource("lang.yml"), GeneralSettings.builder().setUseDefaults(false).build(), LoaderSettings.builder().setAutoUpdate(true).build(), DumperSettings.DEFAULT, UpdaterSettings.builder().setKeepAll(true).setVersioning(new BasicVersioning("version")).build());
- new CurrencyConverter(new Config(new File(getDataFolder(), "currencies.yml")));
HOOKS = new Config(new File(getDataFolder(), "currencies.yml"), getResource("currencies.yml"), GeneralSettings.builder().setUseDefaults(false).build(), LoaderSettings.builder().setAutoUpdate(true).build(), DumperSettings.DEFAULT, UpdaterSettings.builder().setKeepAll(true).setVersioning(new BasicVersioning("version")).build());
TOGGLED = new Config(new File(getDataFolder(), "toggled.yml"), getResource("toggled.yml"), GeneralSettings.builder().setUseDefaults(false).build(), LoaderSettings.DEFAULT, DumperSettings.DEFAULT, UpdaterSettings.DEFAULT);
@@ -69,10 +67,10 @@ public final class AxTrade extends AxPlugin {
getServer().getPluginManager().registerEvents(new EntityInteractListener(), this);
getServer().getPluginManager().registerEvents(new TradeListeners(), this);
- new HookManager().setupHooks();
+ HookManager.setupHooks();
NumberUtils.reload();
- new TradeTicker().start();
+ TradeTicker.start();
Commands.registerCommand();
diff --git a/src/main/java/com/artillexstudios/axtrade/api/AxTradeAPI.java b/src/main/java/com/artillexstudios/axtrade/api/AxTradeAPI.java
index b0c944a..7619c80 100644
--- a/src/main/java/com/artillexstudios/axtrade/api/AxTradeAPI.java
+++ b/src/main/java/com/artillexstudios/axtrade/api/AxTradeAPI.java
@@ -1,4 +1,13 @@
package com.artillexstudios.axtrade.api;
+import com.artillexstudios.axtrade.hooks.HookManager;
+import com.artillexstudios.axtrade.hooks.currency.CurrencyHook;
+import org.bukkit.plugin.Plugin;
+import org.jetbrains.annotations.NotNull;
+
public class AxTradeAPI {
+
+ public static void registerCurrencyHook(@NotNull Plugin plugin, @NotNull CurrencyHook currencyHook) {
+ HookManager.registerCurrencyHook(plugin, currencyHook);
+ }
}
diff --git a/src/main/java/com/artillexstudios/axtrade/api/events/AxTradeRequestEvent.java b/src/main/java/com/artillexstudios/axtrade/api/events/AxTradeRequestEvent.java
index 6a3acab..72841a1 100644
--- a/src/main/java/com/artillexstudios/axtrade/api/events/AxTradeRequestEvent.java
+++ b/src/main/java/com/artillexstudios/axtrade/api/events/AxTradeRequestEvent.java
@@ -44,5 +44,4 @@ public class AxTradeRequestEvent extends Event implements Cancellable {
public Player getReceiver() {
return receiver;
}
-
}
\ No newline at end of file
diff --git a/src/main/java/com/artillexstudios/axtrade/currencyconverter/CurrencyConverter.java b/src/main/java/com/artillexstudios/axtrade/currencyconverter/CurrencyConverter.java
deleted file mode 100644
index 45c3245..0000000
--- a/src/main/java/com/artillexstudios/axtrade/currencyconverter/CurrencyConverter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.artillexstudios.axtrade.currencyconverter;
-
-import com.artillexstudios.axapi.config.Config;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class CurrencyConverter {
-
- public CurrencyConverter(Config config) {
- if (config.getString("currencies.CoinsEngine.currency-name", null) == null) return;
-
- final List