Skip to content

Commit

Permalink
Fixes for /npc command sequential
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jun 11, 2020
1 parent 1fd6ccb commit 244496d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main/src/main/java/net/citizensnpcs/trait/CommandTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ public int compare(NPCCommand o1, NPCCommand o2) {
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() {
Expand Down

0 comments on commit 244496d

Please sign in to comment.