Skip to content

Automation engine for Hytale servers that enables custom commands, event-based triggers, conditions, and advanced actions through a powerful JSON configuration system. Create dynamic messages, sounds, titles, broadcasts, rewards, and automated behaviors without scripting.

License

Notifications You must be signed in to change notification settings

sergiomb04/EasyActions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyActions

EasyActions is a lightweight, JSON-driven trigger/action system that lets you automate server behavior without writing code. It listens to events (joins, deaths, commands, etc.) and executes configurable action pipelines (messages, sounds, titles, commands...).

It's designed for developers and server operators who want fast, declarative automation with minimal boilerplate.


Core Concept

Each trigger:

  • Has a type (event or command)
  • Optionally defines command metadata
  • Executes a list of actions
  • Uses placeholders like %player%, %arg_0%, %args%

Structure

{
  "trigger_id": {
    "type": "...",
    "command": { ... },
    "actions": [ ... ]
  }
}

Practical Examples

Example 1 --- Welcome Player on Join

{
  "welcomejoin": {
    "type": "on_join",
    "actions": [
      {
        "type": "message",
        "target": "player",
        "parameters": {
          "text": "Welcome back %player%"
        }
      },
      {
        "type": "sound",
        "target": "executor",
        "parameters": {
          "sound": "SFX_Avatar_Powers_Enable",
          "category": "SFX",
          "mode": "3D",
          "volume": 1.0,
          "pitch": 12.0
        }
      }
    ]
  }
}

Example 2 --- Custom Command (/helloworld)

{
  "on_command:helloworld": {
    "type": "on_command",
    "command": {
      "name": "helloworld",
      "description": "Just a example message command."
    },
    "actions": [
      {
        "type": "message",
        "target": "executor",
        "parameters": {
          "text": "Hello world!"
        }
      },
      {
        "type": "sound",
        "target": "executor",
        "parameters": {
          "sound": "SFX_Battleaxe_T1_Swing_Charged",
          "category": "SFX",
          "mode": "2D",
          "volume": 1.0,
          "pitch": 1.0
        }
      }
    ]
  }
}

Example 3 --- Player Kill Reward

{
  "anykill": {
    "type": "on_kill",
    "actions": [
      {
        "type": "message",
        "target": "player",
        "parameters": {
          "text": "Nice kill %player%!"
        }
      },
      {
        "type": "title",
        "target": "player",
        "parameters": {
          "title": "+1 KILL",
          "subtitle": "Eres una bestia %player%!"
        }
      }
    ]
  }
}

Example 4 --- Command With Arguments (/addrank)

{
  "on_command:addrank": {
    "type": "on_command",
    "command": {
      "name": "addrank",
      "description": "Set rank to a player FAST.",
      "permission": "*",
      "allows_extra_arguments": true,
      "aliases": ["setrank", "rankset", "rank"]
    },
    "actions": [
      {
        "type": "command",
        "target": "console",
        "parameters": {
          "commands": [
            "lp user %arg_0% parent add %arg_2%"
          ]
        }
      },
      {
        "type": "message",
        "target": "executor",
        "parameters": {
          "text": "Rank has been set! (Hopefully)"
        }
      }
    ]
  }
}

Supported Triggers

EasyActions currently provides the following built-in triggers:

  • ON_JOIN — Fired when a player joins the server.
  • ON_COMMAND — Fired when a registered custom command is executed.
  • ON_DEATH — Fired when a player dies.
  • ON_KILL — Fired when a player kills any entity (including players).
  • ON_PLAYER_KILL_PLAYER — Fired when a player kills another player.
  • ON_PLAYER_DEATH_BY_PLAYER — Fired when a player dies specifically to another player.

Note: Trigger names in JSON are case-insensitive but typically written in lowercase (e.g., on_join, on_command).


Available Action Types

  • message
  • sound
  • title
  • command

Placeholders / Variables

EasyActions supports dynamic placeholder replacement inside action parameters.
Placeholders are resolved at runtime using the current ActionContext.

Player / Sender

  • %player% — Display name of the player (same as executor when sender is a player)
  • %executor% — Display name of the executor (player only)
  • %sender% — Display name of the command/event sender
  • %uuid% — UUID of the sender

Command Placeholders

Available only for ON_COMMAND triggers.

  • %name% — Command name used (first token of input)
  • %arg_0% — First argument
  • %arg_1% — Second argument
  • %arg_n% — Nth argument (0-based)

Example

Command input: /addrank Notch admin

Resolves to:

  • %name%addrank
  • %arg_0%Notch
  • %arg_1%admin

Argument Groups

  • %args% — Full argument string (everything after the command name)
  • %args_1% — Arguments starting from index 1
  • %args_2% — Arguments starting from index 2
  • etc.

Example

Input: /bcTitle Hello world from server

  • %args%Hello world from server
  • %args_1%world from server
  • %args_2%from server

Placeholders that cannot be resolved are left unchanged.


Typical Use Cases

  • Fast command prototyping
  • Server automation
  • Event reactions
  • Reward systems
  • Broadcast utilities
  • Permission wrappers

About

Automation engine for Hytale servers that enables custom commands, event-based triggers, conditions, and advanced actions through a powerful JSON configuration system. Create dynamic messages, sounds, titles, broadcasts, rewards, and automated behaviors without scripting.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages