Variables

This page was last updated for version v1.2.0

Description

The most important part of creating an effect with TreasureParticles is variables, as they allow you to create any desired type of effect. To use variables, it is necessary to first list all variables beforehand. Unlisted variables will result in errors.

When naming your variables, make sure that each variable has a unique name, does not contain special characters, and does not contain spaces. Variable names are case-sensitive.

You can give your variables a default value by adding name=<VALUE>. Let's say you want to add a x variable and set the value of x to 5 by default, you can just add x=5 to the variables list.

Example

effects:
  rainbow-circle:
    display-name: "%rainbow-circle%"
    color-animation: "rainbow"
    permission: "%rainbow-effects%"
    variables: [ 'r', 'x', 'y' ]

As seen in the example, we listed and defined the "r", "x", and "y" variables.

Pre-defined Variables

Some variables are predefined by the plugin. A variable with the same name as these predefined variables should not be used.

veloticyLength: magnitude of the vector squared

Last updated