⚙️How to make action
This page will help you with using our actions api in configurations
First steps, creating action
Okay, we're starting to create our first action. The new actions type that presents our actions library is based on sections. Here is an example of the functionality of sections in the config:
actions: # <-- This is section name.
first: # <-- This is the first section in our list of sections.
data1: # <-- We can add multiple data rows to the section
data2:
second: # <-- This is another section. You can create unlimited sections in the list.
Now you know how to use actions. Lets take a look at action format. When we create an action, we name it arbitrarily. The name must be together and must be unique in the list.
actions:
action_name: # <<<---
Now you have to add action data for full funcionality.
Select a action from the list of library actions
or select action from specific plugin
. For a example we will make a message action with multiple lines.
Every action request type. Determine the type as follows:
actions:
action_name:
type: message # <-- here paste your selected action instead of a message
Now just add requested data for your action. Message only request values/value. Each action has a proper example in the action list
.
actions:
action_name:
type: message
values: # <-- example of message action
- '&cHello %player_name%'
- '&aThis action is so cool'
Adding conditions
Now we have working action. But now we want to make a specific conditions for this action. It is really easy. Just make this:
actions:
action_name:
conditions:
#
# condition data...
#
type: ...
If you don't know how to make a condition, you can go threw a tutorial here
!
Last updated
Was this helpful?