Fix a few more missing localized names.

This commit is contained in:
GJ 2013-02-15 13:30:39 -05:00
parent 5e8b036481
commit d14821e385
3 changed files with 5 additions and 4 deletions

View File

@ -42,6 +42,7 @@ import com.gmail.nossr50.skills.smelting.SmeltingCommand;
import com.gmail.nossr50.skills.swords.SwordsCommand;
import com.gmail.nossr50.skills.taming.TamingCommand;
import com.gmail.nossr50.skills.unarmed.UnarmedCommand;
import com.gmail.nossr50.skills.utilities.SkillTools;
import com.gmail.nossr50.skills.utilities.SkillType;
import com.gmail.nossr50.skills.woodcutting.WoodcuttingCommand;
import com.gmail.nossr50.spout.commands.MchudCommand;
@ -55,7 +56,7 @@ public final class CommandRegistrationHelper {
public static void registerSkillCommands() {
for (SkillType skill : SkillType.values()) {
String commandName = skill.toString().toLowerCase();
String localizedName = LocaleLoader.getString(StringUtils.getCapitalized(commandName) + ".SkillName").toLowerCase();
String localizedName = SkillTools.getSkillName(skill);
PluginCommand command;

View File

@ -449,9 +449,10 @@ public class PlayerListener implements Listener {
String command = message.substring(1).split(" ")[0];
String lowerCaseCommand = command.toLowerCase();
// Do these ACTUALLY have to be lower case to work properly?
for (SkillType skill : SkillType.values()) {
String skillName = skill.toString().toLowerCase();
String localizedName = LocaleLoader.getString(StringUtils.getCapitalized(skillName) + ".SkillName").toLowerCase();
String localizedName = SkillTools.getSkillName(skill).toLowerCase();
if (lowerCaseCommand.equals(localizedName)) {
event.setMessage(message.replace(command, skillName));

View File

@ -6,7 +6,6 @@ import org.bukkit.command.CommandSender;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.utilities.SkillTools;
import com.gmail.nossr50.skills.utilities.SkillType;
import com.gmail.nossr50.util.StringUtils;
public class XplockCommand extends SpoutCommand {
@Override
@ -53,7 +52,7 @@ public class XplockCommand extends SpoutCommand {
spoutHud.setXpBarLocked(true);
spoutHud.setSkillLock(skill);
spoutHud.updateXpBar();
sender.sendMessage(LocaleLoader.getString("Commands.xplock.locked", StringUtils.getCapitalized(skill.toString())));
sender.sendMessage(LocaleLoader.getString("Commands.xplock.locked", SkillTools.getSkillName(skill)));
}
}