From 244496dca34db19639f0385b2cab4a2aef724b10 Mon Sep 17 00:00:00 2001 From: fullwall Date: Thu, 11 Jun 2020 16:23:48 +0800 Subject: [PATCH] Fixes for /npc command sequential --- main/src/main/java/net/citizensnpcs/trait/CommandTrait.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java b/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java index 6c7db6127..ea214fc8b 100644 --- a/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java @@ -125,11 +125,12 @@ public class CommandTrait extends Trait { for (NPCCommand command : commandList) { if (sequential) { PlayerNPCCommand info = cooldowns.get(player.getUniqueId().toString()); - if (info != null && command.id < info.lastUsedId) { + if (info != null && command.id <= info.lastUsedId) { if (info.lastUsedId == max) { info.lastUsedId = -1; + } else { + continue; } - continue; } } Runnable runnable = new Runnable() {