Skip to content

structures

ShaneBeee edited this page Jan 30, 2026 · 5 revisions

Command

  • Description: Create a command.
    Command Format:

    • <global/player/world> command /command_name (args)

    Argument Formats:

    • <type>
    • <name:type>
    • <type:"description">
    • <name:type:"description">
    • <> = Makes the argument required.
    • [<>] = Makes the argument optional.
    • Type = The type of argument to use (required).
    • Name = The name of the argument, this will be used to create local variables (optional).
    • Description = The description of the argument, this is show in the command GUI (optional).

    Entries:

    • Description = The description for your command that will show in the commands gui (optional).
    • Permission = The permission required to execute the command (optional).
    • Aliases = A list of aliases for the command (optional).
  • Patterns:

    • [global] command <.+>
    • player command <.+>
    • world command <.+>
  • Examples:

command /kill:
	description: Kill all the players
	trigger:
		kill all players

command /home [<name:string:"Name of home">]:
	trigger:
		if {_name} is set:
			teleport player to {homes::%{_name}%}
		else:
			teleport player to {homes::default}

command /broadcast <message:string:"Message to broadcast">:
	trigger:
		broadcast {_message}

player command /clear:
	permission: my.script.command.clear
	description: Clear your inventory
	trigger:
		clear inventory of player
		send "Your inventory has been cleared" to player

world command /spawn:
	description: Will teleport all players to the world spawn
	trigger:
		teleport all players to spawn location of context-world
  • Since: 1.0.0

Function

  • Description: Creates a function that can be called from other scripts.
  • Pattern: [(local:local[ ])] func[tion] <^[a-zA-Z0-9_]*>([(params:%*functionparameters%)])[(return: :: <.+>)]
  • Since: 1.0.0

Clone this wiki locally