Display power level cap on mcstats command

This commit is contained in:
Bill Tarbell 2012-07-29 20:05:05 -04:00
parent ca9ce1ba1b
commit 422550abfd
2 changed files with 9 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.gmail.nossr50.commands.CommandHelper;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Users;
@ -26,6 +27,11 @@ public class McstatsCommand implements CommandExecutor {
CommandHelper.printCombatSkills(player);
CommandHelper.printMiscSkills(player);
int powerLevelCap = Config.getInstance().getPowerLevelCap();
if (powerLevelCap > 0)
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Capped", new Object[] { String.valueOf(Users.getPlayer(player).getPowerLevel()), String.valueOf(powerLevelCap) }));
else
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel", new Object[] { String.valueOf(Users.getPlayer(player).getPowerLevel()) }));
return true;

View File

@ -408,6 +408,7 @@ Commands.Party.Teleport=<player> [[RED]]- Teleport to party member
Commands.Party.Toggle=[[RED]]- Toggle Party Chat
Commands.Party=<party-name> [[RED]]- Create/Join designated party
Commands.PowerLevel.Leaderboard=[[YELLOW]]--mcMMO[[BLUE]] Power Level [[YELLOW]]Leaderboard--
Commands.PowerLevel.Capped=[[DARK_RED]]POWER LEVEL: [[GREEN]]{0} [[DARK_RED]]MAX LEVEL: [[YELLOW]]{1}
Commands.PowerLevel=[[DARK_RED]]POWER LEVEL: [[GREEN]]{0}
Commands.Skill.Invalid=[[RED]]That is not a valid skillname!
Commands.Skill.Leaderboard=[[YELLOW]]--mcMMO [[BLUE]]{0}[[YELLOW]] Leaderboard--