geforkt von Mirrors/Paper
Catch errors loading plugins
Dieser Commit ist enthalten in:
Ursprung
cb2ff3c8bb
Commit
b396707cb9
@ -74,10 +74,16 @@ public final class CraftServer implements Server {
|
|||||||
|
|
||||||
private void loadPlugin(Plugin plugin) {
|
private void loadPlugin(Plugin plugin) {
|
||||||
List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin);
|
List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin);
|
||||||
|
|
||||||
if (!pluginCommands.isEmpty()) {
|
if (!pluginCommands.isEmpty()) {
|
||||||
commandMap.registerAll(plugin.getDescription().getName(), pluginCommands);
|
commandMap.registerAll(plugin.getDescription().getName(), pluginCommands);
|
||||||
}
|
}
|
||||||
pluginManager.enablePlugin(plugin);
|
|
||||||
|
try {
|
||||||
|
pluginManager.enablePlugin(plugin);
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " loading " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren