Choice Argument (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.17

Syntax

[the] choice arg[ument] <(\d+)>

Description

Represents the literal argument out of a choice group selected by the command sender. Choice arguments, just like regular arguments, are numbered in order of occurrence (left to right). This expression also supports optional literal arguments.

Examples

command /alert (restart|giveaway):
	trigger:
		if the choice argument is "restart":
			broadcast "<red>The server is restarting in 5 minutes!"
		else: # must be giveaway
			broadcast "<aqua>A giveaway is starting soon at spawn!"

View source