From a634fe9233832932f4cf5b212c6fa1ba3c5ce9e7 Mon Sep 17 00:00:00 2001 From: Perry Davis Date: Thu, 3 Sep 2015 19:14:23 +0100 Subject: [PATCH] Added locale support for gm command Message returned on use of the gm command did not previously support the localization file. --- src/main/java/com/skcraft/plume/module/GameModeCommands.java | 2 +- src/main/resources/com/skcraft/plume/lang/Plume.properties | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/skcraft/plume/module/GameModeCommands.java b/src/main/java/com/skcraft/plume/module/GameModeCommands.java index 33ae13b..c9d4cee 100644 --- a/src/main/java/com/skcraft/plume/module/GameModeCommands.java +++ b/src/main/java/com/skcraft/plume/module/GameModeCommands.java @@ -44,7 +44,7 @@ public void gameMode(@Sender EntityPlayerMP player, int mode, @Optional EntityPl try { gameType = GameType.values()[mode]; player.setGameType(GameType.getByID(mode)); - player.addChatMessage(new ChatComponentText("You have switched to " + GameType.getByID(mode) + " mode.")); + player.addChatMessage(new ChatComponentText((tr("gameModeCommands.gm1")) + GameType.getByID(mode) + (tr("gameModeCommands.gm2")))); } catch (ArrayIndexOutOfBoundsException e) { throw new CommandException("You specified an invalid gamemode."); } diff --git a/src/main/resources/com/skcraft/plume/lang/Plume.properties b/src/main/resources/com/skcraft/plume/lang/Plume.properties index c2e7a4b..dbb698b 100755 --- a/src/main/resources/com/skcraft/plume/lang/Plume.properties +++ b/src/main/resources/com/skcraft/plume/lang/Plume.properties @@ -153,3 +153,5 @@ logger.items.inventoryName=Logged Items gameModeCommands.switchcr=§eYou have switched to CREATIVE Mode. gameModeCommands.switchsu=§eYou have switched to SURVIVAL Mode. +gameModeCommands.gm1=§eYou have switched to +gameModeCommands.gm2=§e mode. \ No newline at end of file