From d600219b58702a88f6f8aae33be71254f2206935 Mon Sep 17 00:00:00 2001 From: HappyPikachu Date: Sun, 30 Jul 2017 13:42:16 -0400 Subject: [PATCH] Additional fix for #76 --- .../quests/prompts/CreateStagePrompt.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java b/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java index 942c96b4e..e2fbc92e5 100644 --- a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java +++ b/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java @@ -717,7 +717,7 @@ public class CreateStagePrompt extends FixedSetPrompt { if (Integer.parseInt(s) > 0) { amounts.add(Integer.parseInt(s)); } 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(); } } catch (NumberFormatException e) { @@ -745,10 +745,10 @@ public class CreateStagePrompt extends FixedSetPrompt { LinkedList durability = new LinkedList(); for (String s : args) { try { - if (Short.parseShort(s) > 0) { + if (Short.parseShort(s) >= 0) { durability.add(Short.parseShort(s)); } 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(); } } catch (NumberFormatException e) { @@ -962,10 +962,10 @@ public class CreateStagePrompt extends FixedSetPrompt { LinkedList durability = new LinkedList(); for (String s : args) { try { - if (Short.parseShort(s) > 0) { + if (Short.parseShort(s) >= 0) { durability.add(Short.parseShort(s)); } 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(); } } catch (NumberFormatException e) { @@ -1179,10 +1179,10 @@ public class CreateStagePrompt extends FixedSetPrompt { LinkedList durability = new LinkedList(); for (String s : args) { try { - if (Short.parseShort(s) > 0) { + if (Short.parseShort(s) >= 0) { durability.add(Short.parseShort(s)); } 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(); } } catch (NumberFormatException e) { @@ -1396,10 +1396,10 @@ public class CreateStagePrompt extends FixedSetPrompt { LinkedList durability = new LinkedList(); for (String s : args) { try { - if (Short.parseShort(s) > 0) { + if (Short.parseShort(s) >= 0) { durability.add(Short.parseShort(s)); } 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(); } } catch (NumberFormatException e) { @@ -1613,10 +1613,10 @@ public class CreateStagePrompt extends FixedSetPrompt { LinkedList durability = new LinkedList(); for (String s : args) { try { - if (Short.parseShort(s) > 0) { + if (Short.parseShort(s) >= 0) { durability.add(Short.parseShort(s)); } 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(); } } catch (NumberFormatException e) {