Ver código fonte

Add message to /mcscoreboard time [n]

riking 11 anos atrás
pai
commit
17b7a9bf10

+ 3 - 1
src/main/java/com/gmail/nossr50/commands/McscoreboardCommand.java

@@ -50,7 +50,9 @@ public class McscoreboardCommand implements TabExecutor {
             if (CommandUtils.isInvalidInteger(sender, args[1])) {
                 return true;
             }
-            ScoreboardManager.setRevertTimer(sender.getName(), Math.abs(Integer.parseInt(args[1])));
+            int time = Math.abs(Integer.parseInt(args[1]));
+            ScoreboardManager.setRevertTimer(sender.getName(), time);
+            sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Timer", time));
         }
         else {
             help(sender);

+ 1 - 1
src/main/resources/locale/locale_en_US.properties

@@ -526,7 +526,7 @@ Commands.Reset=[[RED]]Reset a skill's level to 0
 Commands.Scoreboard.Clear=[[DARK_AQUA]]mcMMO scoreboard cleared.
 Commands.Scoreboard.NoBoard=[[RED]]The mcMMO scoreboard is not active.
 Commands.Scoreboard.Keep=[[DARK_AQUA]]The mcMMO scoreboard will stay up until you use [[GREEN]]/mcscoreboard clear[[DARK_AQUA]].
-#Commands.Scoreboard.Timer=[[BLUE]]This scoreboard will remain visible for [[GOLD]]{1}[[BLUE]] seconds.
+Commands.Scoreboard.Timer=[[DARK_AQUA]]The mcMMO scoreboard will clear [[GOLD]]{1}[[DARK_AQUA]] seconds from now.
 Commands.Scoreboard.Help.0=[[GOLD]] == [[GREEN]]Help for [[RED]]/mcscoreboard[[GOLD]] == 
 Commands.Scoreboard.Help.1=[[DARK_AQUA]]/mcscoreboard[[AQUA]] clear [[WHITE]] - clear the McMMO scoreboard
 Commands.Scoreboard.Help.2=[[DARK_AQUA]]/mcscoreboard[[AQUA]] keep [[WHITE]] - keep the mcMMO scoreboard up