How to use vanilla commands
Last updated
Last updated
It is possible that inside your ExecutableItem you will use vanilla commands that needs a position, such as:
playsound..
summon..
particle..
effect..
etc
If its the case, let's explain you something, all commands in the commands section are run by the console, so when you type "summon zombie ~ ~ ~" that command will be run from "0,0,0" in the default world.
To avoid this you have to add "execute at %player% run" before the command, that will force the command to be run from the coordinates where the player is.
For example:
These are special exceptions, that means, placeholders or general stuff that only works by certain conditions.
If its the case that the activator you are using is related with a block (if don't know what we are talking explore the gui or check the basic tutorial), you can use the block placeholders on commands, such as:
"Multi-world" compatibility for the vanilla commands.
execute in <<NAME
OF
YOUR_WORLD>> run ...
Example, you want summon a Zombie in the world SsomarWorld:
execute in <<SsomarWorld>> run summon zombie 100 50 100
Example with a placeholder:
execute in <<%player_world%>> run summon zombie 100 50 100
execute in <<%block_world%>> run particle firework %block_x% %block_y% %block_z% 1 1 1 0.2 20
In case this didn't help you to achieve what you wanted or doesn't work for you, feel free to ask in the Discord of Ssomar plugins your question.
If its the case that the activator is related with an entity (if don't know what we are talking explore the gui or check the basic tutorial), you can use the entity placeholders on commands, such as: