Reduce duplicate strings for Crowdin

This commit is contained in:
HappyPikachu 2018-03-22 00:19:47 -04:00
parent b7143785ed
commit 19959586bc
6 changed files with 52 additions and 59 deletions

View File

@ -1366,7 +1366,7 @@ public class EventFactory implements ConversationAbandonedListener {
@Override @Override
protected Prompt acceptValidatedInput(ConversationContext context, Number input) { protected Prompt acceptValidatedInput(ConversationContext context, Number input) {
if (input.intValue() < 1) { if (input.intValue() < 1) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("eventEditorAtLeastOneSecond")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new StormDurationPrompt(); return new StormDurationPrompt();
} }
context.setSessionData(CK.E_WORLD_STORM_DURATION, input.intValue()); context.setSessionData(CK.E_WORLD_STORM_DURATION, input.intValue());
@ -1750,7 +1750,7 @@ public class EventFactory implements ConversationAbandonedListener {
try { try {
int i = Integer.parseInt(input); int i = Integer.parseInt(input);
if (i < 1) { if (i < 1) {
player.sendMessage(ChatColor.LIGHT_PURPLE + input + " " + ChatColor.RED + Lang.get("eventEditorNotGreaterThanZero")); player.sendMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new MobAmountPrompt(mobIndex, questMob); return new MobAmountPrompt(mobIndex, questMob);
} }
questMob.setSpawnAmounts(i); questMob.setSpawnAmounts(i);
@ -1829,11 +1829,13 @@ public class EventFactory implements ConversationAbandonedListener {
try { try {
chance = Float.parseFloat(input); chance = Float.parseFloat(input);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("eventEditorInvalidDropChance")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "0.0").replace("<greatest>", "1.0"));
return new MobDropPrompt(invIndex, mobIndex, questMob); return new MobDropPrompt(invIndex, mobIndex, questMob);
} }
if (chance > 1 || chance < 0) { if (chance > 1 || chance < 0) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("eventEditorInvalidDropChance")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "0.0").replace("<greatest>", "1.0"));
return new MobDropPrompt(invIndex, mobIndex, questMob); return new MobDropPrompt(invIndex, mobIndex, questMob);
} }
questMob.dropChances[invIndex] = chance; questMob.dropChances[invIndex] = chance;
@ -2032,7 +2034,7 @@ public class EventFactory implements ConversationAbandonedListener {
int i = Integer.parseInt(s); int i = Integer.parseInt(s);
long l = i * 1000; long l = i * 1000;
if (l < 1000) { if (l < 1000) {
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("eventEditorNotGreaterThanOneSecond")); player.sendMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new PotionDurationsPrompt(); return new PotionDurationsPrompt();
} }
effDurations.add(l / 50L); effDurations.add(l / 50L);
@ -2063,7 +2065,7 @@ public class EventFactory implements ConversationAbandonedListener {
try { try {
int i = Integer.parseInt(s); int i = Integer.parseInt(s);
if (i < 1) { if (i < 1) {
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("eventEditorNotGreaterThanZero")); player.sendMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new PotionMagnitudesPrompt(); return new PotionMagnitudesPrompt();
} }
magAmounts.add(i); magAmounts.add(i);
@ -2089,7 +2091,7 @@ public class EventFactory implements ConversationAbandonedListener {
protected Prompt acceptValidatedInput(ConversationContext context, Number input) { protected Prompt acceptValidatedInput(ConversationContext context, Number input) {
if (input.intValue() != -1) { if (input.intValue() != -1) {
if (input.intValue() < 0) { if (input.intValue() < 0) {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("eventEditorHungerLevelAtLeastZero")); ((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new HungerPrompt(); return new HungerPrompt();
} else { } else {
context.setSessionData(CK.E_HUNGER, (Integer) input.intValue()); context.setSessionData(CK.E_HUNGER, (Integer) input.intValue());
@ -2112,7 +2114,7 @@ public class EventFactory implements ConversationAbandonedListener {
protected Prompt acceptValidatedInput(ConversationContext context, Number input) { protected Prompt acceptValidatedInput(ConversationContext context, Number input) {
if (input.intValue() != -1) { if (input.intValue() != -1) {
if (input.intValue() < 0) { if (input.intValue() < 0) {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("eventEditorSaturationLevelAtLeastZero")); ((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new SaturationPrompt(); return new SaturationPrompt();
} else { } else {
context.setSessionData(CK.E_SATURATION, (Integer) input.intValue()); context.setSessionData(CK.E_SATURATION, (Integer) input.intValue());
@ -2135,7 +2137,7 @@ public class EventFactory implements ConversationAbandonedListener {
protected Prompt acceptValidatedInput(ConversationContext context, Number input) { protected Prompt acceptValidatedInput(ConversationContext context, Number input) {
if (input.intValue() != -1) { if (input.intValue() != -1) {
if (input.intValue() < 0) { if (input.intValue() < 0) {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("eventEditorHealthLevelAtLeastZero")); ((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new HealthPrompt(); return new HealthPrompt();
} else { } else {
context.setSessionData(CK.E_HEALTH, (Integer) input.intValue()); context.setSessionData(CK.E_HEALTH, (Integer) input.intValue());

View File

@ -786,7 +786,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Integer.parseInt(s) > 0) { if (Integer.parseInt(s) > 0) {
amounts.add(Integer.parseInt(s)); amounts.add(Integer.parseInt(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new BreakBlockAmountsPrompt(); return new BreakBlockAmountsPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -817,7 +817,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Short.parseShort(s) >= 0) { if (Short.parseShort(s) >= 0) {
durability.add(Short.parseShort(s)); durability.add(Short.parseShort(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new BreakBlockDurabilityPrompt(); return new BreakBlockDurabilityPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1004,7 +1004,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Integer.parseInt(s) > 0) { if (Integer.parseInt(s) > 0) {
amounts.add(Integer.parseInt(s)); amounts.add(Integer.parseInt(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new DamageBlockAmountsPrompt(); return new DamageBlockAmountsPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1035,7 +1035,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Short.parseShort(s) >= 0) { if (Short.parseShort(s) >= 0) {
durability.add(Short.parseShort(s)); durability.add(Short.parseShort(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new DamageBlockDurabilityPrompt(); return new DamageBlockDurabilityPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1222,7 +1222,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Integer.parseInt(s) > 0) { if (Integer.parseInt(s) > 0) {
amounts.add(Integer.parseInt(s)); amounts.add(Integer.parseInt(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new PlaceBlockAmountsPrompt(); return new PlaceBlockAmountsPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1253,7 +1253,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Short.parseShort(s) >= 0) { if (Short.parseShort(s) >= 0) {
durability.add(Short.parseShort(s)); durability.add(Short.parseShort(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new PlaceBlockDurabilityPrompt(); return new PlaceBlockDurabilityPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1440,7 +1440,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Integer.parseInt(s) > 0) { if (Integer.parseInt(s) > 0) {
amounts.add(Integer.parseInt(s)); amounts.add(Integer.parseInt(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new UseBlockAmountsPrompt(); return new UseBlockAmountsPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1471,7 +1471,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Short.parseShort(s) >= 0) { if (Short.parseShort(s) >= 0) {
durability.add(Short.parseShort(s)); durability.add(Short.parseShort(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new UseBlockDurabilityPrompt(); return new UseBlockDurabilityPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1658,7 +1658,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Integer.parseInt(s) > 0) { if (Integer.parseInt(s) > 0) {
amounts.add(Integer.parseInt(s)); amounts.add(Integer.parseInt(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new CutBlockAmountsPrompt(); return new CutBlockAmountsPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1689,7 +1689,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Short.parseShort(s) >= 0) { if (Short.parseShort(s) >= 0) {
durability.add(Short.parseShort(s)); durability.add(Short.parseShort(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new CutBlockDurabilityPrompt(); return new CutBlockDurabilityPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -1963,7 +1963,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Integer.parseInt(s) > 0) { if (Integer.parseInt(s) > 0) {
amounts.add(Integer.parseInt(s)); amounts.add(Integer.parseInt(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new EnchantAmountsPrompt(); return new EnchantAmountsPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -2328,7 +2328,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (Integer.parseInt(s) > 0) { if (Integer.parseInt(s) > 0) {
amounts.add(Integer.parseInt(s)); amounts.add(Integer.parseInt(s));
} else { } else {
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new NpcAmountsToKillPrompt(); return new NpcAmountsToKillPrompt();
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
@ -2583,7 +2583,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
try { try {
int i = Integer.parseInt(s); int i = Integer.parseInt(s);
if (i < 1) { if (i < 1) {
player.sendMessage(ChatColor.LIGHT_PURPLE + input + " " + ChatColor.RED + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new MobAmountsPrompt(); return new MobAmountsPrompt();
} }
mobAmounts.add(i); mobAmounts.add(i);
@ -2652,7 +2652,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
try { try {
int i = Integer.parseInt(s); int i = Integer.parseInt(s);
if (i < 1) { if (i < 1) {
player.sendMessage(ChatColor.LIGHT_PURPLE + input + " " + ChatColor.RED + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new MobRadiiPrompt(); return new MobRadiiPrompt();
} }
radii.add(i); radii.add(i);
@ -2853,7 +2853,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
try { try {
int i = Integer.parseInt(s); int i = Integer.parseInt(s);
if (i < 1) { if (i < 1) {
player.sendMessage(ChatColor.LIGHT_PURPLE + input + " " + ChatColor.RED + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new ReachRadiiPrompt(); return new ReachRadiiPrompt();
} }
radii.add(i); radii.add(i);
@ -3022,7 +3022,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
try { try {
int i = Integer.parseInt(s); int i = Integer.parseInt(s);
if (i < 1) { if (i < 1) {
player.sendMessage(ChatColor.LIGHT_PURPLE + input + " " + ChatColor.RED + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new TameAmountsPrompt(); return new TameAmountsPrompt();
} }
mobAmounts.add(i); mobAmounts.add(i);
@ -3172,7 +3172,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
try { try {
int i = Integer.parseInt(s); int i = Integer.parseInt(s);
if (i < 1) { if (i < 1) {
player.sendMessage(ChatColor.LIGHT_PURPLE + input + " " + ChatColor.RED + Lang.get("stageEditorNotGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new ShearAmountsPrompt(); return new ShearAmountsPrompt();
} }
shearAmounts.add(i); shearAmounts.add(i);
@ -3644,7 +3644,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
return new DelayPrompt(); return new DelayPrompt();
} }
if (stageDelay < 1000) { if (stageDelay < 1000) {
player.sendMessage(ChatColor.RED + Lang.get("stageEditorInvalidDelay")); player.sendMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new DelayPrompt(); return new DelayPrompt();
} else { } else {
context.setSessionData(pref + CK.S_DELAY, stageDelay); context.setSessionData(pref + CK.S_DELAY, stageDelay);

View File

@ -89,7 +89,8 @@ public class DateTimePrompt extends FixedSetPrompt {
try { try {
int amt = Integer.parseInt(input); int amt = Integer.parseInt(input);
if (amt < 1 || amt > 31) { if (amt < 1 || amt > 31) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("dateCreateInvalidDay")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "1").replace("<greatest>", "31"));
return new DayPrompt(); return new DayPrompt();
} else { } else {
cc.setSessionData("tempDay", Integer.parseInt(input)); cc.setSessionData("tempDay", Integer.parseInt(input));
@ -118,7 +119,8 @@ public class DateTimePrompt extends FixedSetPrompt {
try { try {
int amt = Integer.parseInt(input); int amt = Integer.parseInt(input);
if (amt < 1 || amt > 12) { if (amt < 1 || amt > 12) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("dateCreateInvalidMonth")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "1").replace("<greatest>", "12"));
return new MonthPrompt(); return new MonthPrompt();
} else { } else {
cc.setSessionData("tempMonth", Integer.parseInt(input)); cc.setSessionData("tempMonth", Integer.parseInt(input));
@ -147,7 +149,8 @@ public class DateTimePrompt extends FixedSetPrompt {
try { try {
int amt = Integer.parseInt(input); int amt = Integer.parseInt(input);
if (amt < 1000 || amt > 9999) { if (amt < 1000 || amt > 9999) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("dateCreateInvalidYear")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "1000").replace("<greatest>", "9999"));
return new YearPrompt(); return new YearPrompt();
} else { } else {
cc.setSessionData("tempYear", Integer.parseInt(input)); cc.setSessionData("tempYear", Integer.parseInt(input));
@ -176,7 +179,8 @@ public class DateTimePrompt extends FixedSetPrompt {
try { try {
int amt = Integer.parseInt(input); int amt = Integer.parseInt(input);
if (amt < 0 || amt > 23) { if (amt < 0 || amt > 23) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("dateCreateInvalidHour")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "0").replace("<greatest>", "23"));
return new HourPrompt(); return new HourPrompt();
} else { } else {
cc.setSessionData("tempHour", Integer.parseInt(input)); cc.setSessionData("tempHour", Integer.parseInt(input));
@ -205,7 +209,8 @@ public class DateTimePrompt extends FixedSetPrompt {
try { try {
int amt = Integer.parseInt(input); int amt = Integer.parseInt(input);
if (amt < 0 || amt > 59) { if (amt < 0 || amt > 59) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("dateCreateInvalidMinute")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "0").replace("<greatest>", "59"));
return new MinutePrompt(); return new MinutePrompt();
} else { } else {
cc.setSessionData("tempMinute", Integer.parseInt(input)); cc.setSessionData("tempMinute", Integer.parseInt(input));
@ -234,7 +239,8 @@ public class DateTimePrompt extends FixedSetPrompt {
try { try {
int amt = Integer.parseInt(input); int amt = Integer.parseInt(input);
if (amt < 0 || amt > 59) { if (amt < 0 || amt > 59) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("dateCreateInvalidSecond")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "0").replace("<greatest>", "59"));
return new SecondPrompt(); return new SecondPrompt();
} else { } else {
cc.setSessionData("tempSecond", Integer.parseInt(input)); cc.setSessionData("tempSecond", Integer.parseInt(input));
@ -263,7 +269,8 @@ public class DateTimePrompt extends FixedSetPrompt {
try { try {
int amt = Integer.parseInt(input.replaceAll("UTC", "")); int amt = Integer.parseInt(input.replaceAll("UTC", ""));
if (amt < -12 || amt > 14) { if (amt < -12 || amt > 14) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("dateCreateInvalidZone")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "-12").replace("<greatest>", "14"));
return new ZonePrompt(); return new ZonePrompt();
} else { } else {
cc.setSessionData("tempZone", Integer.parseInt(input)); cc.setSessionData("tempZone", Integer.parseInt(input));

View File

@ -268,7 +268,8 @@ public class ItemStackPrompt extends FixedSetPrompt {
try { try {
int amt = Integer.parseInt(input); int amt = Integer.parseInt(input);
if (amt < 1 || amt > 64) { if (amt < 1 || amt > 64) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("itemCreateInvalidAmount")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidRange")
.replace("<least>", "1").replace("<greatest>", "64"));
return new AmountPrompt(); return new AmountPrompt();
} else { } else {
cc.setSessionData("tempAmount", Integer.parseInt(input)); cc.setSessionData("tempAmount", Integer.parseInt(input));
@ -363,7 +364,7 @@ public class ItemStackPrompt extends FixedSetPrompt {
try { try {
int num = Integer.parseInt(input); int num = Integer.parseInt(input);
if (num < 1) { if (num < 1) {
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("itemCreateInvalidLevel")); cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
return new LevelPrompt(enchantment); return new LevelPrompt(enchantment);
} else { } else {
if (cc.getSessionData("tempEnchantments") != null) { if (cc.getSessionData("tempEnchantments") != null) {

View File

@ -226,7 +226,7 @@ public class RequirementsPrompt extends FixedSetPrompt {
@Override @Override
protected Prompt acceptValidatedInput(ConversationContext context, Number input) { protected Prompt acceptValidatedInput(ConversationContext context, Number input) {
if (input.intValue() < -1) { if (input.intValue() < -1) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqGreaterThanZero")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
return new QuestPointsPrompt(); return new QuestPointsPrompt();
} else if (input.intValue() == -1) { } else if (input.intValue() == -1) {
return new RequirementsPrompt(quests, factory); return new RequirementsPrompt(quests, factory);

View File

@ -247,13 +247,11 @@ stageEditorInvalidNumber: "is not a number!"
stageEditorInvalidDye: "is not a valid dye color!" stageEditorInvalidDye: "is not a valid dye color!"
stageEditorInvalidEvent: "is not a valid event name!" stageEditorInvalidEvent: "is not a valid event name!"
stageEditorDuplicateEvent: "Event is already in the list!" stageEditorDuplicateEvent: "Event is already in the list!"
stageEditorInvalidDelay: "Delay must be at least one second!"
stageEditorInvalidScript: "Denizen script not found!" stageEditorInvalidScript: "Denizen script not found!"
stageEditorNoCitizens: "Citizens is not installed!" stageEditorNoCitizens: "Citizens is not installed!"
stageEditorNoDenizen: "Denizen is not installed!" stageEditorNoDenizen: "Denizen is not installed!"
stageEditorPositiveAmount: "You must enter a positive number!" stageEditorPositiveAmount: "You must enter a positive number!"
stageEditorNoNumber: "Input was not a number!" stageEditorNoNumber: "Input was not a number!"
stageEditorNotGreaterThanZero: "is not greater than 0!"
stageEditorNotListofNumbers: "Invalid entry, input was not a list of numbers!" stageEditorNotListofNumbers: "Invalid entry, input was not a list of numbers!"
stageEditorNoDelaySet: "You must set a delay first!" stageEditorNoDelaySet: "You must set a delay first!"
stageEditorNoBlockNames: "You must set block names first!" stageEditorNoBlockNames: "You must set block names first!"
@ -374,7 +372,6 @@ eventEditorSetItemAmounts: "Set item amounts"
eventEditorNoNames: "No names set" eventEditorNoNames: "No names set"
eventEditorMustSetNames: "You must set item names first!" eventEditorMustSetNames: "You must set item names first!"
eventEditorInvalidName: "is not a valid item name!" eventEditorInvalidName: "is not a valid item name!"
eventEditorNotGreaterThanZero: "is not greater than 0!"
eventEditorNotANumber: "is not a number!" eventEditorNotANumber: "is not a number!"
eventEditorStorm: "Event Storm" eventEditorStorm: "Event Storm"
eventEditorSetWorld: "Set world" eventEditorSetWorld: "Set world"
@ -386,8 +383,6 @@ eventEditorMustSetStormDuration: "You must set a storm duration!"
eventEditorStormCleared: "Storm data cleared." eventEditorStormCleared: "Storm data cleared."
eventEditorEnterStormWorld: "Enter a world name for the storm to occur in, <cancel>" eventEditorEnterStormWorld: "Enter a world name for the storm to occur in, <cancel>"
eventEditorEnterDuration: "Enter duration (in seconds)" eventEditorEnterDuration: "Enter duration (in seconds)"
eventEditorAtLeastOneSecond: "Amount must be at least 1 second!"
eventEditorNotGreaterThanOneSecond: "is not greater than 1 second!"
eventEditorThunder: "Event Thunder" eventEditorThunder: "Event Thunder"
eventEditorMustSetThunderDuration: "You must set a thunder duration!" eventEditorMustSetThunderDuration: "You must set a thunder duration!"
eventEditorThunderCleared: "Thunder data cleared." eventEditorThunderCleared: "Thunder data cleared."
@ -425,7 +420,6 @@ eventEditorSetMobHelmet: "Set helmet"
eventEditorSetMobHelmetDrop: "Set drop chance of helmet" eventEditorSetMobHelmetDrop: "Set drop chance of helmet"
eventEditorSetMobSpawnAmount: "Set the amount of mobs to spawn" eventEditorSetMobSpawnAmount: "Set the amount of mobs to spawn"
eventEditorSetDropChance: "Set the drop chance" eventEditorSetDropChance: "Set the drop chance"
eventEditorInvalidDropChance: "Drop chance has to be between 0.0 and 1.0"
eventEditorPotionEffects: "Event Potion Effects" eventEditorPotionEffects: "Event Potion Effects"
eventEditorSetPotionEffectTypes: "Set potion effect types" eventEditorSetPotionEffectTypes: "Set potion effect types"
eventEditorMustSetPotionTypesFirst: "You must set potion effect types first!" eventEditorMustSetPotionTypesFirst: "You must set potion effect types first!"
@ -447,14 +441,11 @@ eventEditorSetMobAmountsPrompt: "Enter mob amount, <cancel>"
eventEditorSetMobNamePrompt: "Enter the name for this mob, <cancel>" eventEditorSetMobNamePrompt: "Enter the name for this mob, <cancel>"
eventEditorSetMobLocationPrompt: "Right-click on a block to select it, <add>, <cancel>" eventEditorSetMobLocationPrompt: "Right-click on a block to select it, <add>, <cancel>"
eventEditorSetPotionEffectsPrompt: "Enter potion effect types, <space>, <cancel>" eventEditorSetPotionEffectsPrompt: "Enter potion effect types, <space>, <cancel>"
eventEditorSetPotionDurationsPrompt: "Enter effect durations (in milliseconds), <space>, <cancel>" eventEditorSetPotionDurationsPrompt: "Enter potion effect durations (in seconds), <space>, <cancel>"
eventEditorSetPotionMagnitudesPrompt: "Enter potion effect magnitudes, <space>, <cancel>" eventEditorSetPotionMagnitudesPrompt: "Enter potion effect magnitudes, <space>, <cancel>"
eventEditorSetHungerPrompt: "Enter hunger level, or -1 to clear" eventEditorSetHungerPrompt: "Enter hunger level, or -1 to clear"
eventEditorHungerLevelAtLeastZero: "Hunger level must be at least 0!"
eventEditorSetSaturationPrompt: "Enter saturation level, or -1 to clear" eventEditorSetSaturationPrompt: "Enter saturation level, or -1 to clear"
eventEditorSaturationLevelAtLeastZero: "Saturation level must be at least 0!"
eventEditorSetHealthPrompt: "Enter health level, or -1 to clear" eventEditorSetHealthPrompt: "Enter health level, or -1 to clear"
eventEditorHealthLevelAtLeastZero: "Health level must be at least 0!"
eventEditorSetTeleportPrompt: "Right-click on a block to teleport the player to, <done>, <clear>, <cancel>" eventEditorSetTeleportPrompt: "Right-click on a block to teleport the player to, <done>, <clear>, <cancel>"
eventEditorCommandsNote: "Note: You may use <player> to refer to the player's name." eventEditorCommandsNote: "Note: You may use <player> to refer to the player's name."
eventEditorSetCommandsPrompt: "Enter commands, <semicolon>, <clear>, <cancel>" eventEditorSetCommandsPrompt: "Enter commands, <semicolon>, <clear>, <cancel>"
@ -490,7 +481,6 @@ reqNoItemsSet: "No items set"
reqNoValuesSet: "No values set" reqNoValuesSet: "No values set"
reqHeroesPrimaryDisplay: "Primary Class:" reqHeroesPrimaryDisplay: "Primary Class:"
reqHeroesSecondaryDisplay: "Secondary Class:" reqHeroesSecondaryDisplay: "Secondary Class:"
reqGreaterThanZero: "Amount must be greater than 0!"
reqNotAQuestName: "<quest> is not a Quest name!" reqNotAQuestName: "<quest> is not a Quest name!"
reqItemCleared: "Item requirements cleared." reqItemCleared: "Item requirements cleared."
reqListsNotSameSize: "The items list and remove items list are not the same size!" reqListsNotSameSize: "The items list and remove items list are not the same size!"
@ -578,28 +568,19 @@ itemCreateLoaded: "Item loaded."
itemCreateNoItem: "No item in hand!" itemCreateNoItem: "No item in hand!"
itemCreateNoName: "You must set a name first!" itemCreateNoName: "You must set a name first!"
itemCreateInvalidName: "Invalid item name!" itemCreateInvalidName: "Invalid item name!"
itemCreateInvalidAmount: "Amount must be between 1 and 64!"
itemCreateInvalidDurab: "Invalid item durability!" itemCreateInvalidDurab: "Invalid item durability!"
itemCreateInvalidEnch: "Invalid enchantment name!" itemCreateInvalidEnch: "Invalid enchantment name!"
itemCreateInvalidLevel: "Level must be greater than 0!"
itemCreateInvalidInput: "Invalid input!" itemCreateInvalidInput: "Invalid input!"
itemCreateNotNumber: "Input was not a number!" itemCreateNotNumber: "Input was not a number!"
itemCreateNoNameAmount: "You must set a name and amount first!" itemCreateNoNameAmount: "You must set a name and amount first!"
itemCreateCriticalError: "A critical error has occurred." itemCreateCriticalError: "A critical error has occurred."
dateCreateEnterDay: "Enter a day (max. 31), <cancel>" dateCreateEnterDay: "Enter a day (max. 31), <cancel>"
dateCreateInvalidDay: "Day must be between 1 and 31!"
dateCreateEnterMonth: "Enter a month (max. 12), <cancel>" dateCreateEnterMonth: "Enter a month (max. 12), <cancel>"
dateCreateInvalidMonth: "Day must be between 1 and 12!"
dateCreateEnterYear: "Enter a year (max. 9999), <cancel>" dateCreateEnterYear: "Enter a year (max. 9999), <cancel>"
dateCreateInvalidYear: "Year must be between 1000 and 9999!"
dateCreateEnterHour: "Enter an hour (max. 23), <cancel>" dateCreateEnterHour: "Enter an hour (max. 23), <cancel>"
dateCreateInvalidHour: "Hour must be between 0 and 23!"
dateCreateEnterMinute: "Enter a minute (max. 59), <cancel>" dateCreateEnterMinute: "Enter a minute (max. 59), <cancel>"
dateCreateInvalidMinute: "Minute must be between 0 and 59!"
dateCreateEnterSecond: "Enter a second (max. 59), <cancel>" dateCreateEnterSecond: "Enter a second (max. 59), <cancel>"
dateCreateInvalidSecond: "Second must be between 0 and 59!"
dateCreateEnterZone: "Enter a UTC time zone (max. 14), <cancel>" dateCreateEnterZone: "Enter a UTC time zone (max. 14), <cancel>"
dateCreateInvalidZone: "Zone must be between -12 and 14!"
dateCreateNoYearAmount: "You must set a year first!" dateCreateNoYearAmount: "You must set a year first!"
questTitle: "-- <quest> --" questTitle: "-- <quest> --"
questObjectivesTitle: "---(<quest>)---" questObjectivesTitle: "---(<quest>)---"
@ -756,10 +737,13 @@ giveQuestPoints: "Gave <number> Quest Points from <player>."
questPointsGiven: "<player> gave you <number> Quest Points." questPointsGiven: "<player> gave you <number> Quest Points."
enableNPCGUI: "<npc> will now provide a GUI Quest Display." enableNPCGUI: "<npc> will now provide a GUI Quest Display."
disableNPCGUI: "<npc> will no longer provide a GUI Quest Display." disableNPCGUI: "<npc> will no longer provide a GUI Quest Display."
invalidMinimum: "Input must be at least <number>!
invalidRange: "Input must be between <least> and <greatest>!"
invalidOption: "Invalid option!"
invalidNumber: "Invalid number." invalidNumber: "Invalid number."
invalidStageNum: "Invalid stage number for Quest <quest>"
noCurrentQuest: "<player> does not currently have any active Quests." noCurrentQuest: "<player> does not currently have any active Quests."
playerNotFound: "Player not found." playerNotFound: "Player not found."
invalidStageNum: "Invalid stage number for Quest <quest>"
errorNPCID: 'Error: There is no NPC with ID <number>' errorNPCID: 'Error: There is no NPC with ID <number>'
errorReading: "Error reading <file>, skipping.." errorReading: "Error reading <file>, skipping.."
errorReadingSuppress: "Error reading <file>, suppressing further errors." errorReadingSuppress: "Error reading <file>, suppressing further errors."
@ -861,7 +845,6 @@ noNamesSet: "No names set"
worlds: "Worlds" worlds: "Worlds"
mobs: "Mobs" mobs: "Mobs"
points: "points" points: "points"
invalidOption: "Invalid option!"
npcHint: "Note: You can left or right click on NPCs to get their ID." npcHint: "Note: You can left or right click on NPCs to get their ID."
listDuplicate: "List contains duplicates!" listDuplicate: "List contains duplicates!"
id: "ID" id: "ID"