Register Argument (Section) — SkBriggy
Addon: SkBriggy · Category: Section · Since: 1.0.0
Syntax
register [optional] %*brigarg% arg[ument] [(named|with name)] %string%Description
Register an argument for a brig command.
Within this section you can apply suggestions with tooltips. The section itself will run when a player types a command, thus variables CAN be used and the [event-]player will be the player typing the command. Local variables will be created for the previously typed args, and can be used in this section. See examples.
`brigarg` = Type of argument. See Brig Argument Type for more details.
`string` = Name of the argument. (Used for local variables and how it shows in game)
`%objects`% = Suggestions for this argument. (If object is not a string, Skript will stringify it)
`min/max` = The min/max range of a number (long/int/float/double) argument.
Examples
register string arg "world" using all worlds
register string arg "world":
apply suggestion all worlds
register string arg "homes" using indexes of {homes::%uuid of player%::*}
register string arg "homes" using:
apply suggestions indexes of {homes::%uuid of player%::*}
register string arg "homes" using:
loop {homes::%uuid of player%::*}:
apply suggestion loop-index with tooltip loop-value
register string arg "gamemode":
apply suggestion "0" with tooltip "survival"
apply suggestion "1" with tooltip "creative"
apply suggestion "2" with tooltip "adventure"
apply suggestion "3" with tooltip "spectator"
brig command /breaky:
arguments:
register string arg named "type" using "bacon", "eggs" and "toast"
register string arg named "style":
if brig-arg-1 = "bacon": # Brig-Args can be used here
apply suggestion "crispy" with tooltip "nice and crispy"
apply suggestion "soft" with tooltip "ewww"
else if {_type} = "eggs": # Local variables of the previous arg are also created
apply suggestion "sunny_side_up" with tooltip "facing the sun"
apply suggestion "scrambled" with tooltip "all mixed up"
apply suggestion "soft_boiled" with tooltip "swimmin for a short time"
apply suggestion "hard_boiled" with tooltip "eww, thats nasty bitch"
else if {_type} = "toast":
apply suggestion "light" with tooltip "just a touch of heat"
apply suggestion "medium" with tooltip "well that sounds perfect"
apply suggestion "dark" with tooltip "nice and crisy"
apply suggestion "burnt" with tooltip "now ya done an fucked er up"