From 1bf126d4f8faddd919d01af148d4d99589ec86c0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 24 May 2013 14:12:50 +1000 Subject: [PATCH] Close #384 - reset locations.yml on error --- proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java b/proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java index b445f418..29f179df 100644 --- a/proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java @@ -35,9 +35,11 @@ public class YamlReconnectHandler implements ReconnectHandler { data = yaml.loadAs( rd, Map.class ); } - } catch ( IOException ex ) + } catch ( Exception ex ) { ProxyServer.getInstance().getLogger().log( Level.WARNING, "Could not load reconnect locations", ex ); + readFile.delete(); + ProxyServer.getInstance().getLogger().log( Level.WARNING, "Reconnect locations have been reset, do NOT worry about this error" ); } if ( data == null )