From 2b304ecebc3a7e5d9e60a1ed9611fc92cd598825 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 24 Jun 2014 18:22:35 +1000 Subject: [PATCH] Close plugin log handlers on disable --- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 4 ++++ 1 file changed, 4 insertions(+) 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 435f00ff..2f49735a 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -355,6 +355,10 @@ public class BungeeCord extends ProxyServer try { plugin.onDisable(); + for ( Handler handler : plugin.getLogger().getHandlers() ) + { + handler.close(); + } } catch ( Throwable t ) { getLogger().severe( "Exception disabling plugin " + plugin.getDescription().getName() );