Skip to content
On this page

📝 Adding commands

If you want to send messages, or execute commands as the console, or as the player, you can make it by using /animation command add command.

TIP

In all commands you can add %player% and %frame% placeholders if you need it.

📚 Command types

START INDEX

Remember that the frame list and the command list start at index 0, so, the first frame corresponds to index 0, and the second, to index 1.

Message 📨

You can add messages to any frame of you animation using the MiniMessage Format to display colored and beautifull info to your users.

Player 👤

You can dispatch commands as the user, just select the player option and put the command (without the slash).

Console 💻

As with the player commands, you can execute commands as the console by using the console option and setting the command (also without the slash).

⚙ Adding to the animation

Continuing with our example animation, we are gonna add some commands and messages. First, we will add a player command to say also hello.

Commands example

  • Command: /animation command add test 0 player me Hello :D!

Now, we will give some money yo each player and send a message saying they are the richest user in the server.

Commands example

  • Commands:
    • /animation command add test 2 console eco give %player% 10000
    • /animation command add test 2 message <reset>Now you are the <gold><bold>richest<reset> user in the server

💫 Result

After all commands added, our config should looks like this.

yml
animations:
  test:
    name: test
    fps: 1.0
    use-minimessage: true
    frames:
      - <gold>Welcome user!
      - Thanks for using
      - <gradient:#0EECFF:#008AE0>HyrexAnimations</gradient> :D
    sounds: {}
    commands: 
      0:
        - '[PLAYER] me Hello :D!'
      2:
        - '[CONSOLE] eco give %player% 10000'
        - '[MESSAGE] <reset>Now you are the <gold><bold>richest<reset> user in the server'

And in-game looks like this:

Commands result

🗑️ Deleting commands

If you want to delete any animation commands, you just need to use the /animation command remove command. Then, you can select the animation, the frame, and the index to delete. If you want to delete all commands in a frame, just ignore the index argument and leave it empty.

For example, to remove the player command added on the example animation, you just need to execute /animation command remove test 0, which will remove all commands from frame 0, and if you want to remove the message of the last frame, execute /animation command remove test 2 1, which will remove the second command of the third index.