mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Register listener for service register event
Former-commit-id: c33861ff6c35a0208091ce40cb4f748e0f2f2468 [formerly 05b8a06247e4e2e8e7898fc6258810be8fa33c12] Former-commit-id: 60ce1c3fc698c811f947a515b078e7d763de6da1
This commit is contained in:
1 parent
901b547ac3
commit
a641b8423c
2 files changed
+5
-2
No files matched your search
@@ -13,6 +13,7 @@ import org.bukkit.event.server.ServiceUnregisterEvent;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.jetbrains.annotations.*;
|
||||
import org.maxgamer.quickshop.QuickShop;
|
||||
import org.maxgamer.quickshop.Util.Util;
|
||||
|
||||
public class Economy_Vault implements EconomyCore, Listener {
|
||||
@Getter
|
||||
@@ -46,6 +47,8 @@ public class Economy_Vault implements EconomyCore, Listener {
|
||||
} else {
|
||||
plugin.getLogger().info("Using economy system: " + this.vault.getName());
|
||||
}
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||
Util.debugLog("Economy service listener was registered.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -314,7 +314,8 @@ public class QuickShop extends JavaPlugin {
|
||||
getLogger().info("Registering BStats Mertics...");
|
||||
submitMeritcs();
|
||||
getLogger().info("QuickShop Loaded! " + enableTimer.endTimer() + " ms.");
|
||||
|
||||
/* Delay the Ecoonomy system load, give a chance to let economy system regiser. */
|
||||
/* And we have a listener to listen the ServiceRegisterEvent :) */
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -782,7 +783,6 @@ public class QuickShop extends JavaPlugin {
|
||||
try {
|
||||
//EconomyCore core = new Economy_Vault();
|
||||
EconomyCore core = null;
|
||||
|
||||
switch (EconomyType.fromID(getConfig().getInt("economy-type"))) {
|
||||
case UNKNOWN:
|
||||
bootError = new BootError("Can't load the Economy provider, invaild value in config.yml.");
|
||||
|
||||
Reference in new issue
Block a user