Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Cleanup after plugins which don't sucessfully enable
This change closes the plugin via the plugin manager, which disables
the plugin, as intended, but also cleans up after the plugin, preventing
any further errors or issues caused by tasks scheduled by the plugin before
it failed.
Backport of 1.13 cf772531f4
Dieser Commit ist enthalten in:
Ursprung
cbd70031ec
Commit
ac697484cf
@ -1,4 +1,4 @@
|
||||
From 13d2ed50d6346f5c8eb7833dd99f7c61e8fd0b29 Mon Sep 17 00:00:00 2001
|
||||
From 8b9f3c48dcc40317ca51b6138eb6e3b766a8652c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 1 May 2018 21:33:35 -0400
|
||||
Subject: [PATCH] Close Plugin Class Loaders on Disable
|
||||
@ -100,7 +100,7 @@ index bd0588a2..cb2b0b9c 100644
|
||||
lookupNames.clear();
|
||||
HandlerList.unregisterAll();
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 40fd71dc..3e87c3dd 100644
|
||||
index 40fd71dc..8b5cea64 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -317,7 +317,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
@ -108,7 +108,7 @@ index 40fd71dc..3e87c3dd 100644
|
||||
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);
|
||||
+ disablePlugin(jPlugin, true); // Paper - close Classloader on disable - She's dead jim
|
||||
+ server.getPluginManager().disablePlugin(jPlugin, true); // Paper - close Classloader on disable - She's dead jim
|
||||
return;
|
||||
// Paper end
|
||||
}
|
||||
@ -144,5 +144,5 @@ index 40fd71dc..3e87c3dd 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
2.19.2
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren