mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-25 01:58:28 +01:00
Fix a few more missing localized names.
This commit is contained in:
parent
5e8b036481
commit
d14821e385
@ -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;
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user