From afde4c2f8bf5ea6f25bd1adad7a37c4b39f28c98 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 13 Feb 2016 17:28:15 -0600 Subject: [PATCH] Automatically disable plugins that fail to load --- ...ly-disable-plugins-that-fail-to-load.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Spigot-API-Patches/0017-Automatically-disable-plugins-that-fail-to-load.patch diff --git a/Spigot-API-Patches/0017-Automatically-disable-plugins-that-fail-to-load.patch b/Spigot-API-Patches/0017-Automatically-disable-plugins-that-fail-to-load.patch new file mode 100644 index 0000000000..d85c7caa15 --- /dev/null +++ b/Spigot-API-Patches/0017-Automatically-disable-plugins-that-fail-to-load.patch @@ -0,0 +1,24 @@ +From 94997a931505151e58013ba362249d63daa09654 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Thu, 11 Feb 2016 23:21:31 -0500 +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 4983ea8..b057b05 100644 +--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java ++++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +@@ -332,6 +332,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); ++ // PaperSpigot start - Disable plugins that fail to load ++ disablePlugin(jPlugin); ++ return; ++ // PaperSpigot end + } + + // Perhaps abort here, rather than continue going, but as it stands, +-- +2.7.1 +