Localization cleanup

This commit is contained in:
BuildTools 2018-12-09 18:25:38 -05:00
parent 7d72d9129c
commit 096a174481
2 changed files with 6 additions and 5 deletions

View File

@ -36,6 +36,7 @@ import me.blackvein.quests.Quester;
import me.blackvein.quests.Quests; import me.blackvein.quests.Quests;
import me.blackvein.quests.util.ItemUtil; import me.blackvein.quests.util.ItemUtil;
import me.blackvein.quests.util.Lang; import me.blackvein.quests.util.Lang;
import me.blackvein.quests.util.MiscUtil;
public class ItemStackPrompt extends FixedSetPrompt { public class ItemStackPrompt extends FixedSetPrompt {
@ -170,14 +171,14 @@ public class ItemStackPrompt extends FixedSetPrompt {
if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) { if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) {
return new DataPrompt(); return new DataPrompt();
} else { } else {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("itemCreateNoIDAmount")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("itemCreateNoNameAmount"));
return new ItemStackPrompt(oldPrompt); return new ItemStackPrompt(oldPrompt);
} }
} else if (input.equalsIgnoreCase("4")) { } else if (input.equalsIgnoreCase("4")) {
if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) { if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) {
return new EnchantmentPrompt(); return new EnchantmentPrompt();
} else { } else {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("itemCreateNoIDAmount")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("itemCreateNoNameAmount"));
return new ItemStackPrompt(oldPrompt); return new ItemStackPrompt(oldPrompt);
} }
} else if (input.equalsIgnoreCase("5")) { } else if (input.equalsIgnoreCase("5")) {
@ -393,7 +394,7 @@ public class ItemStackPrompt extends FixedSetPrompt {
@Override @Override
public Prompt acceptInput(ConversationContext cc, String input) { public Prompt acceptInput(ConversationContext cc, String input) {
if (input.equalsIgnoreCase(Lang.get("cmdClear")) == false && input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) { if (input.equalsIgnoreCase(Lang.get("cmdClear")) == false && input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
Enchantment e = Quests.getEnchantmentPretty(input); Enchantment e = Quests.getEnchantmentPretty(MiscUtil.getCapitalized(input));
if (e != null) { if (e != null) {
cc.setSessionData("tempEnchant", e); cc.setSessionData("tempEnchant", e);
return new LevelPrompt(Quester.prettyEnchantmentString(e)); return new LevelPrompt(Quester.prettyEnchantmentString(e));

View File

@ -28,11 +28,11 @@ COMMAND_QUESTADMIN_GIVE_HELP: "<command> [player] [quest] - Force a player to ta
COMMAND_QUESTADMIN_QUIT: "quit" COMMAND_QUESTADMIN_QUIT: "quit"
COMMAND_QUESTADMIN_QUIT_HELP: "<command> [player] [quest] - Force a player to quit a quest" COMMAND_QUESTADMIN_QUIT_HELP: "<command> [player] [quest] - Force a player to quit a quest"
COMMAND_QUESTADMIN_POINTS: "points" COMMAND_QUESTADMIN_POINTS: "points"
COMMAND_QUESTADMIN_POINTS_HELP: "<command> [player] [amount] - Set a players' Quest Points" COMMAND_QUESTADMIN_POINTS_HELP: "<command> [player] [amount] - Set a player's Quest Points"
COMMAND_QUESTADMIN_TAKEPOINTS: "takepoints" COMMAND_QUESTADMIN_TAKEPOINTS: "takepoints"
COMMAND_QUESTADMIN_TAKEPOINTS_HELP: "<command> [player] [amount] - Take away a player's Quest Points" COMMAND_QUESTADMIN_TAKEPOINTS_HELP: "<command> [player] [amount] - Take away a player's Quest Points"
COMMAND_QUESTADMIN_GIVEPOINTS: "givepoints" COMMAND_QUESTADMIN_GIVEPOINTS: "givepoints"
COMMAND_QUESTADMIN_GIVEPOINTS_HELP: "<command> [player] [amount] - Add to a player Quest Points" COMMAND_QUESTADMIN_GIVEPOINTS_HELP: "<command> [player] [amount] - Add to a player's Quest Points"
COMMAND_QUESTADMIN_POINTSALL: "pointsall" COMMAND_QUESTADMIN_POINTSALL: "pointsall"
COMMAND_QUESTADMIN_POINTSALL_HELP: "<command> [amount] - Set ALL players' Quest Points" COMMAND_QUESTADMIN_POINTSALL_HELP: "<command> [amount] - Set ALL players' Quest Points"
COMMAND_QUESTADMIN_FINISH: "finish" COMMAND_QUESTADMIN_FINISH: "finish"