📚
GSLibrary
  • 👋Welcome
  • 👾Our plugins
  • Language API
    • 🇬🇧Languages
    • 🇰🇳For developers
  • Color API
    • 🎨Colors in configurations
  • GUI API
    • 🆕Creating GUI
    • 📕GUI Normal item
  • ACTIONS API
    • ⚙️How to make action
    • 📰Actions list
  • CONDITIONS API
    • 📐How to make condition
    • 📰Conditions types list
Powered by GitBook
On this page
  • First steps, creating action
  • Adding conditions

Was this helpful?

  1. ACTIONS API

How to make action

This page will help you with using our actions api in configurations

PreviousGUI Normal itemNextActions list

Last updated 2 years ago

Was this helpful?

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:

example of section list
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.

creating action, action name
actions:
  action_name: # <<<---

Now you have to add action data for full funcionality.

Select a action from the or select action from . For a example we will make a message action with multiple lines.

Every action request type. Determine the type as follows:

creating action, action type
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 .

creating action, action data
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:

conditions example
actions:
  action_name:
    conditions:
      #
      # condition data...
      #
    type: ...

If you don't know how to make a condition, you can go threw a tutorial !

⚙️
list of library actions
specific plugin
action list
here