forked from BLOCKFANTASY/LOOHP-Limbo
Catch plugin enable disable errors
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
<groupId>com.loohp</groupId>
|
<groupId>com.loohp</groupId>
|
||||||
<artifactId>Limbo</artifactId>
|
<artifactId>Limbo</artifactId>
|
||||||
<name>Limbo</name>
|
<name>Limbo</name>
|
||||||
<version>0.7.1-ALPHA</version>
|
<version>0.7.2-ALPHA</version>
|
||||||
|
|
||||||
<description>Standalone Limbo Minecraft Server.</description>
|
<description>Standalone Limbo Minecraft Server.</description>
|
||||||
<url>https://github.com/LOOHP/Limbo</url>
|
<url>https://github.com/LOOHP/Limbo</url>
|
||||||
|
|||||||
@@ -338,8 +338,12 @@ public final class Limbo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (LimboPlugin plugin : Limbo.getInstance().getPluginManager().getPlugins()) {
|
for (LimboPlugin plugin : Limbo.getInstance().getPluginManager().getPlugins()) {
|
||||||
|
try {
|
||||||
console.sendMessage("Enabling plugin " + plugin.getName() + " " + plugin.getInfo().getVersion());
|
console.sendMessage("Enabling plugin " + plugin.getName() + " " + plugin.getInfo().getVersion());
|
||||||
plugin.onEnable();
|
plugin.onEnable();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
new RuntimeException("Error while enabling " + plugin.getName() + " " + plugin.getInfo().getVersion(), e).printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
server = new ServerConnection(properties.getServerIp(), properties.getServerPort());
|
server = new ServerConnection(properties.getServerIp(), properties.getServerPort());
|
||||||
@@ -553,8 +557,12 @@ public final class Limbo {
|
|||||||
console.sendMessage("Stopping Server...");
|
console.sendMessage("Stopping Server...");
|
||||||
|
|
||||||
for (LimboPlugin plugin : Limbo.getInstance().getPluginManager().getPlugins()) {
|
for (LimboPlugin plugin : Limbo.getInstance().getPluginManager().getPlugins()) {
|
||||||
|
try {
|
||||||
console.sendMessage("Disabling plugin " + plugin.getName() + " " + plugin.getInfo().getVersion());
|
console.sendMessage("Disabling plugin " + plugin.getName() + " " + plugin.getInfo().getVersion());
|
||||||
plugin.onDisable();
|
plugin.onDisable();
|
||||||
|
} catch (Throwable e) {
|
||||||
|
new RuntimeException("Error while disabling " + plugin.getName() + " " + plugin.getInfo().getVersion(), e).printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tick.waitAndKillThreads(5000);
|
tick.waitAndKillThreads(5000);
|
||||||
|
|||||||
Reference in New Issue
Block a user