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