From 6fcfb5aecb3e4e7aa3f65cf90ee5c95a1f44f946 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Tue, 9 Sep 2014 22:08:36 +0200 Subject: [PATCH] Add more message arguments. See #1214. --- .../bungee/module/cmd/server/CommandServer.java | 2 +- .../java/net/md_5/bungee/ServerConnector.java | 2 +- .../java/net/md_5/bungee/UserConnection.java | 4 ++-- proxy/src/main/resources/messages.properties | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/module/cmd-server/src/main/java/net/md_5/bungee/module/cmd/server/CommandServer.java b/module/cmd-server/src/main/java/net/md_5/bungee/module/cmd/server/CommandServer.java index ad254205..88c53e33 100644 --- a/module/cmd-server/src/main/java/net/md_5/bungee/module/cmd/server/CommandServer.java +++ b/module/cmd-server/src/main/java/net/md_5/bungee/module/cmd/server/CommandServer.java @@ -39,7 +39,7 @@ public class CommandServer extends Command implements TabExecutor Map servers = ProxyServer.getInstance().getServers(); if ( args.length == 0 ) { - player.sendMessage( ProxyServer.getInstance().getTranslation( "current_server" ) + player.getServer().getInfo().getName() ); + player.sendMessage( ProxyServer.getInstance().getTranslation( "current_server", player.getServer().getInfo().getName() ) ); TextComponent serverList = new TextComponent( ProxyServer.getInstance().getTranslation( "server_list" ) ); serverList.setColor( ChatColor.GOLD ); boolean first = true; diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java index 5b13911e..e53b1bca 100644 --- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java +++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java @@ -238,7 +238,7 @@ public class ServerConnector extends PacketHandler throw CancelSendSignal.INSTANCE; } - String message = bungee.getTranslation( "connect_kick", target.getName() ) + event.getKickReason(); + String message = bungee.getTranslation( "connect_kick", target.getName(), event.getKickReason() ); if ( user.isDimensionChange() ) { user.disconnect( message ); diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index a719381b..14b2452a 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -261,10 +261,10 @@ public final class UserConnection implements ProxiedPlayer { if ( dimensionChange ) { - disconnect( bungee.getTranslation( "fallback_kick" ) + future.cause().getClass().getName() ); + disconnect( bungee.getTranslation( "fallback_kick", future.cause().getClass().getName() ) ); } else { - sendMessage( bungee.getTranslation( "fallback_kick" ) + future.cause().getClass().getName() ); + sendMessage( bungee.getTranslation( "fallback_kick", future.cause().getClass().getName() ) ); } } } diff --git a/proxy/src/main/resources/messages.properties b/proxy/src/main/resources/messages.properties index 154dd91b..588d826a 100644 --- a/proxy/src/main/resources/messages.properties +++ b/proxy/src/main/resources/messages.properties @@ -1,19 +1,19 @@ alert=\u00a78[\u00a74Alert\u00a78]\u00a7r -already_connected=\u00a7cYou are already connected to this server +already_connected=\u00a7cYou are already connected to this server! already_connecting=\u00a7cAlready connecting to this server! command_list=\u00a7a[{0}] \u00a7e({1}): \u00a7r{2} -connect_kick=\u00a7cKicked whilst connecting to {0}: -current_server=\u00a76You are currently connected to -fallback_kick=\u00a7cCould not connect to default or fallback server, please try again later: -fallback_lobby=\u00a7cCould not connect to target server, you have been moved to the fallback server +connect_kick=\u00a7cKicked whilst connecting to {0}: {1} +current_server=\u00a76You are currently connected to {0}. +fallback_kick=\u00a7cCould not connect to default or fallback server, please try again later: {0} +fallback_lobby=\u00a7cCould not connect to target server, you have been moved to the fallback server. lost_connection=[Proxy] Lost connection to server. mojang_fail=Error occurred while contacting login servers, are they down? no_permission=\u00a7cYou do not have permission to execute this command! -no_server=\u00a7cThe specified server does not exist -no_server_permission=\u00a7cYou don't have permission to access this server +no_server=\u00a7cThe specified server does not exist. +no_server_permission=\u00a7cYou don't have permission to access this server. outdated_client=Outdated Client! outdated_server=Outdated Server! -proxy_full=Server is full +proxy_full=Server is full! restart=[Proxy] Proxy restarting. server_kick=[Kicked] server_list=\u00a76You may connect to the following servers at this time: