Skip to content

Commit

Permalink
simplify startup debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 18, 2021
1 parent cc978ed commit cbc3b50
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -38,7 +38,7 @@ public void onEnable() {
Debug.echoError("Cannot load Depenizen-Bungee bridge: Internal exception was thrown!");
Debug.echoError(ex);
}
Debug.log("Depenizen loaded! " + loadedBridges.size() + " plugin bridge(s) loaded (of " + allBridges.size() + " available)");
Debug.log("Depenizen loaded! <A>" + loadedBridges.size() + "<W> plugin bridge(s) loaded (of <A>" + allBridges.size() + "<W> available)");
}

@Override
Expand All @@ -53,17 +53,15 @@ public void onDisable() {
public void checkLoadBungeeBridge() {
String bungeeServer = getConfig().getString("Bungee server address", "none");
if (CoreUtilities.equalsIgnoreCase(bungeeServer, "none")) {
Debug.log("<G>Depenizen will not load bungee bridge.");
return;
}
new BungeeBridge().init(bungeeServer, getConfig().getInt("Bungee server port", 25565));
Debug.log("Depenizen loaded bungee bridge!");
Debug.log("Loaded bungee bridge!");
}

public void loadBridge(String name, Supplier<Bridge> bridgeSupplier) {
Plugin plugin = Bukkit.getPluginManager().getPlugin(name);
if (plugin == null) {
Debug.log("<G>Depenizen will not load bridge for '" + name + "'.");
return;
}
Bridge newBridge;
Expand All @@ -90,7 +88,7 @@ public void loadBridge(String name, Supplier<Bridge> bridgeSupplier) {
return;
}
loadedBridges.put(name, newBridge);
Debug.log("Depenizen loaded bridge for '" + name + "'!");
Debug.log("Loaded bridge for '" + name + "'!");
}

public void registerCoreBridges() {
Expand Down

0 comments on commit cbc3b50

Please sign in to comment.