mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-09 08:52:03 +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;
|
return command.hand == hand || command.hand == Hand.BOTH;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
if (executionMode == ExecutionMode.RANDOM && commandList.size() > 0) {
|
if (executionMode == ExecutionMode.RANDOM) {
|
||||||
runCommand(player, commandList.get(Util.getFastRandom().nextInt(commandList.size())));
|
if (commandList.size() > 0) {
|
||||||
|
runCommand(player, commandList.get(Util.getFastRandom().nextInt(commandList.size())));
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
int max = -1;
|
int max = -1;
|
||||||
if (executionMode == ExecutionMode.SEQUENTIAL) {
|
if (executionMode == ExecutionMode.SEQUENTIAL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user