Skip to content

Example Commands

Shane Bee edited this page Feb 27, 2024 · 13 revisions

Here are some simple examples

Ban Command

brig command /brigban <player> <time:int> <span:string> <reason:greedy string>:
	arguments:
		set suggestions of arg "span" to "minutes", "hours" and "days"
	trigger:
		set {_timespan} to "%{_time}% %{_span}%" parsed as time span
		set {_reason} to "&c%{_reason}%"
		ban {_player} due to {_reason} for {_timespan}
		kick {_player} due to {_reason}
		send "&7[&bBan&7] &eYou banned &b%{_player}% &efor &b%{_timespan}% &edue to &f""%{_reason}%&f"""

Usage:
/brigban ShaneBee 10 days you were super bad today

Visual:

Breakfast Command

This is purely to show off arguments

brig command /breaky:
	arguments:
		register string arg named "type" using "bacon", "eggs" and "toast"
		register string arg named "style":
			if brig-arg-1 = "bacon":
				apply suggestion "crispy" with tooltip "nice and crispy"
				apply suggestion "soft" with tooltip "ewww"
			else if {_type} = "eggs":
				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"
			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 "oof"

Usage: /breaky bacon crispy
/breaky eggs sunny_side_up
/breaky toast medium

Item Command

brig command /i <item> [<amount:int>]:
	permission: customcommands.items.give
	trigger:
		set {_amount} to 1 if {_amount} is not set
		give {_amount} of {_item} to player

Usage:
/i minecraft:diamond_sword{Damage:500}
/i diamond 100
/i minecraft:oak_stairs 64

Home Command

brig command /home:
	arguments:
		register string arg "home" using (indexes of {homes::%uuid of player%::*})
	trigger:
		set {_h} to {homes::%uuid of player%::%{_home}%}
		if {_h} is set:
			send "&7[&bHOMES&7] &6Teleporting to home &f""&b%{_home}%&f"""
			teleport player to {_h}
		else:
			send "&7[&bHOMES&7] &cInvalid home &f""&e%{_home}%&f"""

brig command /sethome <home:string>:
	trigger:
		set {homes::%uuid of player%::%{_home}%} to location of player
		send "&7[&bHOMES&7] &6Successfully set home &f""&b%{_home}%&f"" &6to your location."

brig command /delhome:
	arguments:
		register string arg "home" using (indexes of {homes::%uuid of player%::*})
	trigger:
		set {_h} to {homes::%uuid of player%::%{_home}%}
		if {_h} is set:
			send "&7[&bHOMES&7] &6Deleted home &f""&b%{_home}%&f"""
			delete {homes::%uuid of player%::%{_home}%}
		else:
			send "&7[&bHOMES&7] &cInvalid home &f""&e%{_home}%&f"""

Teleport Command

brig command /letp <player> <location>:
	trigger:
		teleport {_player} to {_location}

Usage:
/letp ShaneBee ~ ~20 ~
/letp @r 1 100 1

Clone this wiki locally