Skip to content

Example Commands

Shane Bee edited this page Jun 18, 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

Delete Entities Command

Delete (rather than kill) entities

#! Delete Entities !#
brig command /delete <entities> [<world>]:
	trigger:
		if {_world} is set:
			delete entities in ({_entities::*} where [world of input = {_world}])
		else:
			delete entities in {_entities::*}

Usages:
/delete @e[distance=..10] Will delete entities within a distance of 10
/delete @e[distance=10..] Will delete all entities 10 meters away and further
/delete @e[type=minecraft:sheep] Will delete all sheep
/delete @e[nbt={NoAI:1b}] Will delete all entities with AI turned off

Item Give Command

Give an item to the player

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

Item Set Slot Command

Set a specific slot of a player to an item

brig command /setitem:
	arguments:
		register players arg "players"
		register int arg "slot" with min 0 and max 40
		register itemstack arg "item"
	trigger:
		loop {_players::*}:
			set slot {_slot} of loop-value to {_item}

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 <players> <location>:
	trigger:
		teleport {_players::*} to {_location}

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

View Distance Command

Set the view distance of players (Requires a PaperMC server)
The distance is limited between 2 and 32

brig command /viewdistance:
	aliases: view
	arguments:
		register int arg "distance" with min 2 and max 32
		register optional players arg "players"
	trigger:
		if {_players::*} is not set:
			set {_players::*} to player
		set view distance of {_players::*} to {_distance}

Usage:
/view 5 @p Set view distance of all players to 5
/view 10 ShaneBee Set the view distance of a specific player to 10