Skip to content

Commands

Ryandw11 edited this page Mar 20, 2023 · 4 revisions

This page describes the commands in the plugin. You will see the following format for the usage:

/cstruct command {parameter} [optional parameter]

Commands

Add Item Command

Usage: /cstruct additem {key}
Permission: customstructures.additem

Registers a custom item to use in loot table. The {key} parameter is then put in the loot table to use the custom item. The plugin adds the item that is in your hand while you run the command.

Addons Command

Usage: /cstruct addons
Permission: customstructures.addon

Display the list of enabled addons.

Check Key Command

Usage: /cstruct checkkey
Permission: customstructures.checkkey

Check the key for the item in your hand. If that item is registered in the custom item system, the key you used to define it is displayed.

Create Command

Usage: /cstruct create {name} {schem}
Permission: customstructures.create

Create a structure by using a command. The {name} parameter is the name of the structure while {schem} is the name of the schematic you want to use (see the createschem command for creating a schematic). If successful, a yaml file with the name: {name}.yml will be created in the structures directory.

Note: This command will automatically detect a compiled schematic.

Create Schematic Command

Usage: /cstruct createschem {name} [-c]
Primary Permission: customstructures.createschematic
Secondary Permission: customstructures.createschematic.options

Create a schematic through the plugin. In order to use this command you need a region selected using world edit. Use //wand and then left and right click to set the first and second position respectively. Those two points define the region you want the schematic to be. The {name} parameter define the name of the schematic. The created schematic is then put in the plugin's schematic directory.

There is an extra option to use with the command. The optional [-c] parameter means the schematic will be compiled. A second file with the ending .cschem will be outputted. A compiled schematic allows the plugin to locate replacement blocks and loot table containers a lot faster when pasting the schematic. This could speed up the structure spawning time for large structures.

Note: A polygon world edit selection (using //sel poly will not work currently due to an issue with World Edit.

Get Item Command

Usage: /cstruct getitem {key}
Permission: customstructures.getitem

Get the Custom Item with the given key: {key}.

List command

Usage: /cstruct list
Permission: none

List all of the active structures.

Nearby Command

Usage: /cstruct nearby [structName] [limit]
Permission: customstructures.findnearby

Find the closest structure to you. You can specify a specific structure to find and how many structures you would like to find.

This requires the logStructures config option to be set to true.

Note: This command is resource intensive. Only give trusted players the ability to use this command. (Version 1.9.0 makes this far less resource intensive).

Reload Command

Usage: /cstruct reload
Permission: customstructures.reload

Reload the plugin to apply any changes to the config.yml or structure config files.

Set LootTable Command

Usage: /cstruct setLootTable {loottable_name}
Permission: customstructures.setloottable

When looking at a container, it places an item inside the container which tells the plugin that the container should be populated with a specific loot table. This allows you to do container specific loot tables (for example, each chest in a structure could have a different loot table). (Note: This needs to be done before creating a schematic.)

Test Command

Usage: /cstruct test {struct_name}
Permission: customstructures.test

Test a structure to ensure it spawn properly. This only tests the schematic spawning, container loot tables, and block replacement.

Test Loot Table Command

Usage: /cstruct testLootTable {lootTableName}
Permission: customstructures.test.loottable

Test a LootTable by filling the contents of the container you are looking at. You must look at a container while running this command.

You can test configuration loot tables, minecraft loot tables, or plugin defined loot tables.

Test Spawn Command

Usage: /cstruct testspawn {struct_name}
Permission: customstructures.test.spawn

Test the internal spawn logic of the plugin to see if the structure can in the chunk the player is standing in. This effectively tests conditions like whitelisted spawn blocks, block level limit, biome, calculated Spawn Y value, and more.