Brig Command (Structure) — SkBriggy
Addon: SkBriggy · Category: Structure · Since: 1.0.0
Syntax
brig[(gy|adier)] command /<.+>Description
Register a new Brigadier command. See wiki for more details on registering: [**SkBriggy Wiki**](https://github.com/ShaneBeee/SkBriggy/wiki/Registering-New-Command)
Command Format: `brig command /namespace:commandName <brigArgType> [<brigArgType>] <argName:brigArgType> [<argName:brigArgType>]:` `namespace` = The namespace of a command. (Optional, defaults to "minecraft:") `commandName` = Represents the command itself, ex: '/mycommand'. `brigArgType` = Represents a brig argument type. - While some may match Skript types, this doesn't actually support Skript types. `argName` = The name of the arg, which will be used to create a local variable for the arg. - In some cases this will show when typing out a command in game. - If this isn't set a local variable will be created using the type (see examples).
Just like Skript commands, wrapping your arg in `[]` makes it optional. Do note at this time there is no support for defaults.
Entries and Sections: `executor_type` = What types of execturs can run this command (Optional, defaults to `all`). `permission:` = Just like Skript, the permission the player will require for this command. `description:` = Just like Skript, this is a string that will be used in the help command. `arguments:` = Section for registering arguments. See `Register Argument` effect. `trigger:` = Section, just like Skript, for executing your code in the command.
Event Values: `[event-]sender` = The sender (console/player/entity) who ran the command or the sender used in Minecraft's `/execute as <sender>` command. `[event-]world` = World of the sender, or default world if sender is console, or world used in Minecraft's `/execute in <world>` command.
Examples
brig command /move <player> <location>:
trigger:
teleport {_player} to {_location}
brig command /move <p1:player> <p2:player>:
trigger:
teleport {_p1} to {_p2}
brig command /i <item> [<amount:int>]:
trigger:
set {_amount} to 1 if {_amount} isn't set
give {_amount} of {_item} to player
brig command /coolserver:party:
permission: coolserver.party
trigger:
teleport all players to spawn of world "world_party"