From f48afa62bdb610d931336e0dc506d347256488b7 Mon Sep 17 00:00:00 2001 From: abhiram Date: Sat, 15 May 2021 15:40:44 +0530 Subject: [PATCH] Add changes in single patch file --- ...dded-an-api-method-to-unload-Plugins.patch | 25 ++++---- ...2-Format-Code-to-Bungee-s-code-style.patch | 63 ------------------- 2 files changed, 13 insertions(+), 75 deletions(-) delete mode 100644 Waterfall-Proxy-Patches/0032-Format-Code-to-Bungee-s-code-style.patch diff --git a/Waterfall-Proxy-Patches/0031-Added-an-api-method-to-unload-Plugins.patch b/Waterfall-Proxy-Patches/0031-Added-an-api-method-to-unload-Plugins.patch index 2283ca2..5a12408 100644 --- a/Waterfall-Proxy-Patches/0031-Added-an-api-method-to-unload-Plugins.patch +++ b/Waterfall-Proxy-Patches/0031-Added-an-api-method-to-unload-Plugins.patch @@ -1,11 +1,12 @@ -From dd467f1949a6dfc2c69626bbf4e5c681e7840da8 Mon Sep 17 00:00:00 2001 +From 14c353d7490b306ac6b9caee45b8d8eec824c128 Mon Sep 17 00:00:00 2001 From: abhiram Date: Thu, 13 May 2021 01:05:03 +0530 Subject: [PATCH] Added an api method to unload Plugins +Format Code to Bungee's code style diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java -index 90031156..3ece27c8 100644 +index 90031156..a190dfae 100644 --- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java +++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java @@ -25,6 +25,7 @@ import java.util.Set; @@ -38,31 +39,31 @@ index 90031156..3ece27c8 100644 + public void unloadPlugin(Plugin plugin) + { + plugin.onDisable(); -+ this.unregisterListeners(plugin); -+ this.unregisterCommands(plugin); -+ this.proxy.getScheduler().cancel(plugin); ++ this.unregisterListeners( plugin ); ++ this.unregisterCommands( plugin ); ++ this.proxy.getScheduler().cancel( plugin ); + -+ for ( Handler handler : plugin.getLogger().getHandlers()) ++ for ( Handler handler : plugin.getLogger().getHandlers() ) + { + handler.close(); + } + + try + { -+ pluginloaders.get(plugin.getDescription().getName()).close(); ++ pluginloaders.get( plugin.getDescription().getName() ).close(); + }catch (Exception exception) + { + exception.printStackTrace(); + } + -+ if(this.plugins.containsKey(plugin.getDescription().getName())) ++ if( this.plugins.containsKey( plugin.getDescription().getName() ) ) + { -+ this.plugins.remove(plugin.getDescription().getName()); ++ this.plugins.remove( plugin.getDescription().getName() ); + } + -+ if(this.pluginloaders.containsKey(plugin.getDescription().getName())) ++ if( this.pluginloaders.containsKey( plugin.getDescription().getName() ) ) + { -+ this.pluginloaders.remove(plugin.getDescription().getName()); ++ this.pluginloaders.remove( plugin.getDescription().getName() ); + } + } + // FlameCord end @@ -75,7 +76,7 @@ index 90031156..3ece27c8 100644 plugins.put( plugin.getName(), clazz ); + // FlameCord start - cache url classloaders to unload plugins -+ pluginloaders.put(plugin.getName(),loader); ++ pluginloaders.put( plugin.getName(),loader ); + // FlameCord end clazz.onLoad(); ProxyServer.getInstance().getLogger().log( Level.INFO, "Loaded plugin {0} version {1} by {2}", new Object[] diff --git a/Waterfall-Proxy-Patches/0032-Format-Code-to-Bungee-s-code-style.patch b/Waterfall-Proxy-Patches/0032-Format-Code-to-Bungee-s-code-style.patch deleted file mode 100644 index dabf980..0000000 --- a/Waterfall-Proxy-Patches/0032-Format-Code-to-Bungee-s-code-style.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 97a8cb2fb8c5b348efd614bb4fd952c0c42caac0 Mon Sep 17 00:00:00 2001 -From: abhiram -Date: Sat, 15 May 2021 13:58:21 +0530 -Subject: [PATCH] Format Code to Bungee's code style - - -diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java -index 3ece27c8..a190dfae 100644 ---- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java -+++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java -@@ -303,31 +303,31 @@ public final class PluginManager - public void unloadPlugin(Plugin plugin) - { - plugin.onDisable(); -- this.unregisterListeners(plugin); -- this.unregisterCommands(plugin); -- this.proxy.getScheduler().cancel(plugin); -+ this.unregisterListeners( plugin ); -+ this.unregisterCommands( plugin ); -+ this.proxy.getScheduler().cancel( plugin ); - -- for ( Handler handler : plugin.getLogger().getHandlers()) -+ for ( Handler handler : plugin.getLogger().getHandlers() ) - { - handler.close(); - } - - try - { -- pluginloaders.get(plugin.getDescription().getName()).close(); -+ pluginloaders.get( plugin.getDescription().getName() ).close(); - }catch (Exception exception) - { - exception.printStackTrace(); - } - -- if(this.plugins.containsKey(plugin.getDescription().getName())) -+ if( this.plugins.containsKey( plugin.getDescription().getName() ) ) - { -- this.plugins.remove(plugin.getDescription().getName()); -+ this.plugins.remove( plugin.getDescription().getName() ); - } - -- if(this.pluginloaders.containsKey(plugin.getDescription().getName())) -+ if( this.pluginloaders.containsKey( plugin.getDescription().getName() ) ) - { -- this.pluginloaders.remove(plugin.getDescription().getName()); -+ this.pluginloaders.remove( plugin.getDescription().getName() ); - } - } - // FlameCord end -@@ -437,7 +437,7 @@ public final class PluginManager - - plugins.put( plugin.getName(), clazz ); - // FlameCord start - cache url classloaders to unload plugins -- pluginloaders.put(plugin.getName(),loader); -+ pluginloaders.put( plugin.getName(),loader ); - // FlameCord end - clazz.onLoad(); - ProxyServer.getInstance().getLogger().log( Level.INFO, "Loaded plugin {0} version {1} by {2}", new Object[] --- -2.26.2.windows.1 -