Skip to main content

Actions & Triggers

Actions are a set of features that are applied to players, teams or matches, similiar to Kits. Multiple actions can be started by one trigger.

info

In the future, some features that are currently used in Kits may be transferred to be used as an Action instead.

Action Elements

ElementDescription
A single Action.
Changes the scope that an action applies to.
A message that is sent to the player.
Sets a new value for a Variable.
Removes entities based on a filter.
Applies a Kit.
Finds and replaces certain items.

Action Attributes

AttributeDescriptionValue
An ID.String
Runs the filter against a certain query., ,
A filter that is tested before running actions inside.Filter

Switch-Scope Attributes

AttributeDescriptionValue
An ID.String
Runs the filter against a new query., ,
The previously defined query., ,

Message Attributes

AttributeDescriptionValueDefault
The text that will be sent to a player.String
The title text.String
The subtitle text.String
The text above the hotbar.String
How long the text will fade in.String0.5 sec
How long the text will display for.String3.5 sec
How long the text will fade out.String1 sec

Set Attributes

AttributeDescriptionValue
The variable to update.Variable
Sets a new value for the variable.String

Kill-Entities Attributes

AttributeDescriptionValue
Filters which entities to remove.Filter

Replace Item Attributes/Elements

AttributeDescriptionValue
The item to find.Item Attributes
The new item to replace with.Item Attributes
Player recives the same amount of the new item as they had of the old item.True/False
Enchantments on the old item will be applied to the new item.True/False
Filters which entities to remove.True/False
Match for item stacks that have a certain amount of items in a range.Range

Trigger Element

The Element waits for a dynamic filter to activate it, and afterwards it will trigger an Action.

Trigger Attributes

AttributeDescriptionValue
A dynamic filter that activiates the trigger.Dynamic Filter
Sets an Action.Action
Runs the filter against a certain query., ,

Example

<kits>
<kit id="spawn">
<item slot="0" unbreakable="true" material="stone sword"/>
<action>
<message text="You were given a kit!"/>
</action>
</kit>
</kits>
<actions>
<action id="do-stuff" scope="player">
<!-- Gives the player who activated the trigger a diamond -->
<message text="You've been given a diamond!"/>
<kit>
<item>diamond</item>
</kit>
<!-- Sends a message to the player's team -->
<switch-scope outer="player" inner="team">
<message text="Your team has been given the spawn kit!"/>
<!-- Gives each player in the team a kit (Kits are applied per player) -->
<switch-scope outer="team" inner="player">
<kit id="spawn"/>
</switch-scope>
</switch-scope>
</action>
<trigger filter="some-dynamic-filter" action="do-stuff" scope="player"/>
<message id="standalone-text" text="This is a standalone text trigger"/>
<trigger filter="another-dynamic-filter" action="standalone-text" scope="player"/>
</actions>