mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-15 23:26:16 +01:00
Fix /npc command random
This commit is contained in:
parent
4e26f52252
commit
0036c9d6a2
@ -142,8 +142,11 @@ public class CommandTrait extends Trait {
|
||||
return command.hand == hand || command.hand == Hand.BOTH;
|
||||
}
|
||||
}));
|
||||
if (executionMode == ExecutionMode.RANDOM && commandList.size() > 0) {
|
||||
runCommand(player, commandList.get(Util.getFastRandom().nextInt(commandList.size())));
|
||||
if (executionMode == ExecutionMode.RANDOM) {
|
||||
if (commandList.size() > 0) {
|
||||
runCommand(player, commandList.get(Util.getFastRandom().nextInt(commandList.size())));
|
||||
}
|
||||
return;
|
||||
}
|
||||
int max = -1;
|
||||
if (executionMode == ExecutionMode.SEQUENTIAL) {
|
||||
|
Loading…
Reference in New Issue
Block a user