Skip to main content

Block commands

Blocks allow to control the behavior of specific block types (doors, chests, etc.).

The following groups are available for the block:

  • owner,
  • allow-change.

Owner defines who can change the properties of the block after its creation. The allow-change specify the player group which can change the state of the block (open a chest, open a door).

Instead of using a specific name of the block a $-symbol could be used. In this case the command will be applied to the block located at the current player's location.

Create a Block​

/share block $name create

Create a new block at a specific location. After the block is created some properties should be changed to have any effect of having a block.

The blocks can only be built by the player with the allow-build group in the current area.

Set Block's Group​

/share block $name group-set owner|allow-change [$group-name]

Sets a respective group to the block:

  • owner is a set of players who can change the block properties.
  • allow-change specify the player group which can change the state of the block (open a chest, open a door).

If the $group-name is not provided the group is removed, which makes it available to everyone. The group with the group-name should be available. Create it in advance if needed (see share group create command).

The owner group is set initially to be the same as the allow-build group in the current player's area.

Add a Token to Block​

/share block $name token-set $token-name [$duration]

Sets a respective token to the block. The token is assigned to the player if he/she successfully changes the block (open a door, open a chest, pushes a button, steps on the floor panel and so on). duration can optionally be provided, which assigns the token to the player only for the given period of time.

The token with the token-name should be available. Create it in advance (share token create command).

You can set several tokens to the block.

The player that executes this operation should be in the allow-assign group of the respective token.

Delete Block's Token​

/share block $name token-delete $token-name

Removes the given token from the block.

Add/Remove an Inventory​

/share block $name inventory-item-set $material-type [$amount]

Adds or removes a specified material to the block's inventory.

If at least one inventory item is added to the block, and inventory token not set or the player posses an inventory-token the inventory is opened. If the inventory is associated with the chest, the chest's inventory is replaced by the block's inventory.

If block has associated inventory-token, then this token will be removed from the player after the inventory is closed.

The player must have world's owner privileges to be able to execute this operation. amount specifies how many of the given item should be provided through inventory. The default value is 1. To remove the item from inventory set the amount to 0.

Set an Inventory Token​

/share block $name inventory-token-set [$token-name]

Adds or removes a specified token as inventory-token.

The inventory will be opened only if the inventory-token is associated with the player. The token will be removed from the player after the inventory is closed.

Get Block's Info​

/share block $name info

Provides a full description of block configuration.

Delete a Block​

/share block $name delete

Removes a given block.