From f668114233c69b4f9eed0f889101255641bf4eb8 Mon Sep 17 00:00:00 2001 From: Wolf2323 Date: Tue, 26 Nov 2024 11:45:31 +0100 Subject: [PATCH] fixed actionObjective use wrong default value for the hand --- .../betonquest/betonquest/objectives/ActionObjective.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/betonquest/betonquest/objectives/ActionObjective.java b/src/main/java/org/betonquest/betonquest/objectives/ActionObjective.java index 8bbaff0e36..6325f63b26 100644 --- a/src/main/java/org/betonquest/betonquest/objectives/ActionObjective.java +++ b/src/main/java/org/betonquest/betonquest/objectives/ActionObjective.java @@ -84,12 +84,12 @@ public ActionObjective(final Instruction instruction) throws InstructionParseExc range = instruction.getVarNum(instruction.getOptional("range", "0")); cancel = instruction.hasArgument("cancel"); final String handString = instruction.getOptional("hand"); - if (handString == null || ANY.equalsIgnoreCase(handString)) { - slot = null; - } else if (handString.equalsIgnoreCase(EquipmentSlot.HAND.toString())) { + if (handString == null || handString.equalsIgnoreCase(EquipmentSlot.HAND.toString())) { slot = EquipmentSlot.HAND; } else if (handString.equalsIgnoreCase(EquipmentSlot.OFF_HAND.toString())) { slot = EquipmentSlot.OFF_HAND; + } else if (ANY.equalsIgnoreCase(handString)) { + slot = null; } else { throw new InstructionParseException("Invalid hand value: " + handString); }