structure
permission: valuesince 1.5.1Who may run the command
command /fly:
permission: "server.fly"
trigger:
execute console command "fly %player.name%"Try it← All of the Docs Commands and events
permission: valuesince 1.5.1Who may run the command
command /fly:
permission: "server.fly"
trigger:
execute console command "fly %player.name%"Try itopsince 1.5.1Server operators and the console, whatever permissions plugin is installed
command /shutdown:
permission: op
trigger:
execute console command "stop"Try itpermission <who> add <node>since 1.5.1Give the permission. It lasts across relogs and restarts
permission player add "server.fly"Try itpermission <who> add <node> for <duration>since 1.7.60Give it for a time: afterwards it is taken back by itself, also if the player was away or the server off meanwhile
command /trialfly:
trigger:
permission player add "server.fly" for 1 hour
send "&aYou can fly for an hour."Try itpermission <who> remove <node>since 1.5.1Take back a permission given this way
permission player remove "server.fly"Try it<who> has permission <node>since 1.5.1A condition; also does not have permission
if player has permission "tools.unbreaking":
cancel eventTry itA command can be limited to players holding a permission node, or to server operators:
command /fly:
permission: "server.fly"
trigger:
execute console command "fly %player.name%"
command /shutdown:
permission: op
trigger:
execute console command "stop"
permission: value | Who may run the command |
|---|---|
a node, such as "server.fly" | Players who have that permission. Quotes are optional |
op | Server operators and the console, whatever permissions plugin is installed |
| not given | Everyone |
Scripts can also hand out permissions themselves:
command /buyfly:
trigger:
if {%player%.coins} < 500:
send "&cFlying costs 500 coins."
stop
subtract 500 from {%player%.coins}
permission player add "server.fly"
send "&aYou can now use /fly."
| Statement | Effect |
|---|---|
permission <who> add <node> | Give the permission. It lasts across relogs and restarts |
permission <who> add <node> for <duration> | Give it for a time: afterwards it is taken back by itself, also if the player was away or the server off meanwhile |
permission <who> remove <node> | Take back a permission given this way |
<who> has permission <node> | A condition; also does not have permission |
<who> is player, all players, or a player name; the player has to be online.remove only undoes what add gave. A permission the player has from a rank or another plugin stays; change that in the plugin that manages your ranks.