From 312a74c5f19c43321e22be50d2a462ad249513c8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 19 Apr 2014 19:48:43 +1000 Subject: [PATCH] Close #963 - log remote ping errors to console, friendly message to clients. --- .../main/java/net/md_5/bungee/connection/InitialHandler.java | 3 ++- proxy/src/main/resources/messages.properties | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index 317e4983f..700406a17 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -162,7 +162,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection if ( error != null ) { result = new ServerPing(); - result.setDescription( "Error pinging remote server: " + Util.exception( error ) ); + result.setDescription( bungee.getTranslation( "ping_cannot_connect" ) ); + bungee.getLogger().log( Level.WARNING, "Error pinging remote server", error ); } result = bungee.getPluginManager().callEvent( new ProxyPingEvent( InitialHandler.this, result ) ).getResponse(); diff --git a/proxy/src/main/resources/messages.properties b/proxy/src/main/resources/messages.properties index fdc84308e..b5fabbd3d 100644 --- a/proxy/src/main/resources/messages.properties +++ b/proxy/src/main/resources/messages.properties @@ -20,3 +20,4 @@ server_list=\u00a76You may connect to the following servers at this time: server_went_down=\u00a7cThe server you were previously on went down, you have been connected to the lobby total_players=Total players online: {0} name_too_long=Cannot have username longer than 16 characters +ping_cannot_connect=\u00a7c[Bungee] Can't connect to server.