Skip to content

Example Commands

Shane Bee edited this page Aug 3, 2023 · 13 revisions

Here are some simple examples

Ban Command

brig command /leban:
	arguments:
		register player arg "player"
		register int arg "time"
		register string arg "span" using "minutes", "hours" and "days"
		register greedy string arg "reason" using "cheating", "harassment", "racism", "bad language" and "<type your own>"
	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:
/leban ShaneBee 10 days you were super bad today

Teleport Command

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

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

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"""
Clone this wiki locally