Fixes for /npc command sequential

This commit is contained in:
fullwall 2020-06-11 16:23:48 +08:00
parent 1fd6ccbad9
commit 244496dca3
1 changed files with 3 additions and 2 deletions

View File

@ -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() {