mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-28 05:35:33 +01:00
Additional fix for #76
This commit is contained in:
parent
1a7db3d3ec
commit
d600219b58
@ -717,7 +717,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("stageEditortNotGreaterThanZero"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero"));
|
||||||
return new BreakBlockAmountsPrompt();
|
return new BreakBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
@ -745,10 +745,10 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
|||||||
LinkedList<Short> durability = new LinkedList<Short>();
|
LinkedList<Short> durability = new LinkedList<Short>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
try {
|
try {
|
||||||
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("stageEditortNotGreaterThanZero"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero"));
|
||||||
return new BreakBlockDurabilityPrompt();
|
return new BreakBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
@ -962,10 +962,10 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
|||||||
LinkedList<Short> durability = new LinkedList<Short>();
|
LinkedList<Short> durability = new LinkedList<Short>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
try {
|
try {
|
||||||
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("stageEditortNotGreaterThanZero"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero"));
|
||||||
return new DamageBlockDurabilityPrompt();
|
return new DamageBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
@ -1179,10 +1179,10 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
|||||||
LinkedList<Short> durability = new LinkedList<Short>();
|
LinkedList<Short> durability = new LinkedList<Short>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
try {
|
try {
|
||||||
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("stageEditortNotGreaterThanZero"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero"));
|
||||||
return new PlaceBlockDurabilityPrompt();
|
return new PlaceBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
@ -1396,10 +1396,10 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
|||||||
LinkedList<Short> durability = new LinkedList<Short>();
|
LinkedList<Short> durability = new LinkedList<Short>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
try {
|
try {
|
||||||
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("stageEditortNotGreaterThanZero"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero"));
|
||||||
return new UseBlockDurabilityPrompt();
|
return new UseBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
@ -1613,10 +1613,10 @@ public class CreateStagePrompt extends FixedSetPrompt {
|
|||||||
LinkedList<Short> durability = new LinkedList<Short>();
|
LinkedList<Short> durability = new LinkedList<Short>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
try {
|
try {
|
||||||
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("stageEditortNotGreaterThanZero"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotGreaterThanZero"));
|
||||||
return new CutBlockDurabilityPrompt();
|
return new CutBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user