diff --git a/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java b/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java index 4ccef1c2f..faa1f176b 100644 --- a/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java @@ -204,6 +204,10 @@ public class CommandTrait extends Trait { for (NPCCommand command : commandList) { if (executionMode == ExecutionMode.SEQUENTIAL) { PlayerNPCCommand info = cooldowns.get(player.getUniqueId().toString()); + if (info != null && info.lastUsedHand != hand) { + info.lastUsedHand = hand; + info.lastUsedId = -1; + } if (info != null && command.id <= info.lastUsedId) { if (info.lastUsedId == max) { info.lastUsedId = -1; @@ -542,6 +546,8 @@ public class CommandTrait extends Trait { @Persist(valueType = Long.class) Map lastUsed = Maps.newHashMap(); @Persist + Hand lastUsedHand; + @Persist int lastUsedId = -1; @Persist Map nUsed = Maps.newHashMap();