From c352e854eec8d6108402c8b2610969f536061afa Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Mon, 19 Aug 2013 15:20:33 +0200 Subject: [PATCH] Catch exceptions when disabling plugins --- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index 861c10ee..dda1ba35 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -360,7 +360,14 @@ public class BungeeCord extends ProxyServer getLogger().info( "Disabling plugins" ); for ( Plugin plugin : pluginManager.getPlugins() ) { - plugin.onDisable(); + try + { + plugin.onDisable(); + } catch (Throwable t) + { + getLogger().severe( "Exception disabling plugin " + plugin.getDescription().getName() ); + t.printStackTrace(); + } getScheduler().cancel( plugin ); }