mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 03:17:36 +01:00
Automatically disable plugins that fail to load
This commit is contained in:
parent
2052670adf
commit
afde4c2f8b
@ -0,0 +1,24 @@
|
||||
From 94997a931505151e58013ba362249d63daa09654 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user