diff --git a/patches/server/Paper-Plugins.patch b/patches/server/Paper-Plugins.patch index 92800ea8b7..d9059bfa72 100644 --- a/patches/server/Paper-Plugins.patch +++ b/patches/server/Paper-Plugins.patch @@ -3994,8 +3994,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + plugin.getLogger().info("Disabling %s".formatted(pluginName)); + + this.server.getPluginManager().callEvent(new PluginDisableEvent(plugin)); -+ -+ javaPlugin.setEnabled(false); ++ try { ++ javaPlugin.setEnabled(false); ++ } catch (Throwable ex) { ++ this.server.getLogger().log(Level.SEVERE, "Error occurred while disabling " + pluginName, ex); ++ } + + ClassLoader classLoader = plugin.getClass().getClassLoader(); + if (classLoader instanceof ConfiguredPluginClassLoader configuredPluginClassLoader) {