mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-10 01:11:22 +01:00
Fix /npc command random
This commit is contained in:
parent
4e26f52252
commit
0036c9d6a2
@ -142,9 +142,12 @@ 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) {
|
||||||
|
if (commandList.size() > 0) {
|
||||||
runCommand(player, commandList.get(Util.getFastRandom().nextInt(commandList.size())));
|
runCommand(player, commandList.get(Util.getFastRandom().nextInt(commandList.size())));
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
int max = -1;
|
int max = -1;
|
||||||
if (executionMode == ExecutionMode.SEQUENTIAL) {
|
if (executionMode == ExecutionMode.SEQUENTIAL) {
|
||||||
Collections.sort(commandList, new Comparator<NPCCommand>() {
|
Collections.sort(commandList, new Comparator<NPCCommand>() {
|
||||||
|
Loading…
Reference in New Issue
Block a user