Command (Structure) — Skript
Addon: Skript · Category: Structure · Since: 1.0, 2.17 (subcommands, suggestions, etc.)
Syntax
command <.+>Description
Used for registering custom commands.
Examples
command /broadcast <string>:
aliases: /bc
executable by: players and console
usage: A command for broadcasting a message to all players.
permission: skript.command.broadcast
cooldown: 15 seconds
cooldown message: You last broadcast a message %elapsed time% ago. You can broadcast another message in %remaining time%.
cooldown bypass: skript.command.broadcast.admin
cooldown storage: {cooldown::%player%}
trigger:
broadcast the argument
command /home:
subcommand set <name: text>:
trigger:
set {homes::%player%::%{_name}%} to the player's location
subcommand <name: text>:
suggestions:
loop {homes::%player%::*}:
add formatted "<ttp:'Location: %loop-value%'>%loop-index%" to the suggestions for the text argument
trigger:
teleport the player to {homes::%player%::%{_name}%}