papermc/Spigot-API-Patches/0014-Automatically-disable-plugins-that-fail-to-load.patch

25 lines
1.1 KiB
Diff
Raw Normal View History

2016-09-03 03:44:52 +00:00
From aca5c5298ce7fca0a9b6d8c8240f94d1a09de085 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
2016-02-29 23:09:49 +00:00
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
2016-09-03 03:44:52 +00:00
index 759c461..d8b9c24 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
2016-09-03 03:44:52 +00:00
@@ -329,6 +329,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);
2016-02-29 23:09:49 +00:00
+ // Paper start - Disable plugins that fail to load
+ disablePlugin(jPlugin);
+ return;
2016-02-29 23:09:49 +00:00
+ // Paper end
}
// Perhaps abort here, rather than continue going, but as it stands,
--
2016-09-03 03:44:52 +00:00
2.9.3