[Question] About getting players based on permission
Opened this issue ยท 2 comments
I've been looking for a method to create a script which sends a message to all players who have a certain permission, much like how the https://github.com/wysohn/TriggerReactor_Examples/blob/master/CommandTrigger/sayall
example works, except only certain players are sent the message.
I've tried something like;
FOR p = getPlayers(player.hasPermission("permission")
So only people with "permission" will receive the message.
If there is a way of doing this please do tell me, it'd be much appreciated, many thanks.
Well the p is the Player object so you can use has Permission() on it directly.
FOR p = getPlayers()
IF p.hasPermission("something")
Blah blah
ENDIF
ENDFOR