Catch exceptions when disabling plugins

This commit is contained in:
Ammar Askar 2013-08-19 15:20:33 +02:00 committed by md_5
parent d8c92cd311
commit c352e854ee

View File

@ -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 );
}