Fix for commands with multiple preconditions

This commit is contained in:
fullwall 2024-01-26 19:48:53 +08:00
parent dbd9cdf1f1
commit c3791d162f
1 changed files with 3 additions and 2 deletions

View File

@ -300,8 +300,9 @@ public class CommandTrait extends Trait {
}
}
runCommand(player, command);
if (executionMode == ExecutionMode.SEQUENTIAL) {
playerTracking.get(player.getUniqueId()).lastUsedHand = hand;
if (executionMode == ExecutionMode.SEQUENTIAL
&& (info = playerTracking.get(player.getUniqueId())) != null) {
info.lastUsedHand = hand;
}
if (executionMode == ExecutionMode.SEQUENTIAL || (charged != null && !charged))
break;