Variable Commands
This project is no longer supported by the developer and will not receive updates. An exception is possible only in case of the author's personal desire, but the probability of this is extremely low.
This is a server-side Fabric mod that introduces a variable system into Minecraft commands. Now you can save values in variables and use them in any server commands.
Main Features
To create a variable, use the command: /var set <variable name> <value>
All values are stored in text format (strings), since Minecraft commands work with text, but are automatically converted to numbers when necessary.
Using Variables
To reference a variable in a command, use the syntax $<variable name>. For example: /gamemode $my_mode
Variables also work in conditional execute constructs: /execute if var my_num = 5 run kill
Mathematical operations with variables are available: /var operation my_num + 13
FABRIC API is required for the mod to work