|
12 | 12 | import com.github.elic0de.thejpspit.database.MySqlDatabase; |
13 | 13 | import com.github.elic0de.thejpspit.database.SqLiteDatabase; |
14 | 14 | import com.github.elic0de.thejpspit.game.Game; |
15 | | -import com.github.elic0de.thejpspit.hook.EconomyHook; |
16 | | -import com.github.elic0de.thejpspit.hook.Hook; |
17 | | -import com.github.elic0de.thejpspit.hook.PlaceholderHook; |
18 | | -import com.github.elic0de.thejpspit.hook.VaultEconomyHook; |
| 15 | +import com.github.elic0de.thejpspit.hook.*; |
19 | 16 | import com.github.elic0de.thejpspit.item.ItemManager; |
20 | 17 | import com.github.elic0de.thejpspit.leveler.Levels; |
21 | 18 | import com.github.elic0de.thejpspit.listener.BlockPlaceListener; |
|
29 | 26 | import com.github.elic0de.thejpspit.villager.villagers.ShopVillager; |
30 | 27 | import com.google.gson.Gson; |
31 | 28 | import com.google.gson.GsonBuilder; |
| 29 | + |
32 | 30 | import java.io.File; |
33 | 31 | import java.io.IOException; |
34 | 32 | import java.lang.reflect.InvocationTargetException; |
35 | 33 | import java.util.ArrayList; |
36 | 34 | import java.util.List; |
37 | 35 | import java.util.Optional; |
38 | 36 | import java.util.logging.Level; |
| 37 | + |
39 | 38 | import net.william278.annotaml.Annotaml; |
40 | 39 | import org.bukkit.Bukkit; |
41 | 40 | import org.bukkit.GameRule; |
@@ -95,7 +94,7 @@ public void onEnable() { |
95 | 94 | this.database = this.loadDatabase(); |
96 | 95 | if (!database.hasLoaded()) { |
97 | 96 | Bukkit.getLogger().log(Level.SEVERE, |
98 | | - "Failed to load database! Please check your credentials! Disabling plugin..."); |
| 97 | + "Failed to load database! Please check your credentials! Disabling plugin..."); |
99 | 98 | Bukkit.getPluginManager().disablePlugin(this); |
100 | 99 | return; |
101 | 100 | } |
@@ -191,7 +190,9 @@ private void registerListener() { |
191 | 190 |
|
192 | 191 | private void registerHooks() { |
193 | 192 | final PluginManager plugins = Bukkit.getPluginManager(); |
194 | | - if (plugins.getPlugin("Vault") != null) { |
| 193 | + if (plugins.getPlugin("Jecon") != null) { |
| 194 | + this.registerHook(new JeconEconomyHook(this)); |
| 195 | + } else if (plugins.getPlugin("Vault") != null) { |
195 | 196 | this.registerHook(new VaultEconomyHook(this)); |
196 | 197 | } |
197 | 198 | if (plugins.getPlugin("PlaceholderAPI") != null) { |
|
0 commit comments