Skip to content

Commit

Permalink
Fix ChestShop not starting if an error occurred hooking into a depend…
Browse files Browse the repository at this point in the history
…ency
  • Loading branch information
Phoenix616 committed Sep 25, 2023
1 parent a9cb809 commit 0fcbcbb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/Acrobot/ChestShop/Dependencies.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.stream.Collectors;

/**
Expand Down Expand Up @@ -68,7 +69,11 @@ public static boolean loadPlugins() {
Plugin plugin = pluginManager.getPlugin(dependency);

if (plugin != null && plugin.isEnabled()) {
loadPlugin(dependency, plugin);
try {
loadPlugin(dependency, plugin);
} catch (Exception e) {
plugin.getLogger().log(Level.WARNING, "Unable to hook into " + plugin.getName() + " " + plugin.getDescription().getVersion(), e);
}
}
}

Expand Down

0 comments on commit 0fcbcbb

Please sign in to comment.