Date: 2019/12/30 05:38:45 UTC-08:00
Type: Denizen Script
pay_command:
type: command
name: skillpointadd
usage: /skillpointadd [player]
description: Pays the specified player.
# Users might be jailed or similar and have their permissions taken away,
# so let's be sure to require a permission to use the command.
permission: skillpoint.add
script:
# Players might just type "/pay" without remembering the input arguments,
# so if they do, just tell them what the input is and stop there.
- if <context.args.size> < 1:
- narrate "<red>/pay [player] [amount]"
- stop
# Use a fallback in case the player name given is invalid.
- define target:<server.match_player[<context.args.get[1]>]||null>
# A user might mess up typing a player name.
# If there's no matched player, just tell them and stop there.
- if <[target]> == null:
- narrate "<red>Unknown player '<yellow><context.args.get[1]><red>'."
- stop