geforkt von Mirrors/Paper
4e958e229f
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
22 Zeilen
1.1 KiB
Diff
22 Zeilen
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 29 Feb 2016 19:45:21 -0600
|
|
Subject: [PATCH] Automatically disable plugins that fail to load
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
|
index b6d739ca8ad8ebd4b1be7ebd129f9a7ae16b2a2a..c8497cb3021f584a885f4cb21c3be576ce0935a7 100644
|
|
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
|
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
|
@@ -344,6 +344,10 @@ public final class JavaPluginLoader implements PluginLoader {
|
|
jPlugin.setEnabled(true);
|
|
} catch (Throwable ex) {
|
|
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
|
+ // Paper start - Disable plugins that fail to load
|
|
+ disablePlugin(jPlugin);
|
|
+ return;
|
|
+ // Paper end
|
|
}
|
|
|
|
// Perhaps abort here, rather than continue going, but as it stands,
|