mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-17 07:45:09 +01:00
Fix ChestShop not starting if an error occurred hooking into a dependency
This commit is contained in:
parent
a9cb8096e6
commit
0fcbcbbb11
@ -20,6 +20,7 @@ import org.bukkit.plugin.PluginManager;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -68,7 +69,11 @@ public class Dependencies implements Listener {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user