Mineuniverse
Mods
Variable Commands

Variable Commands

MOD
Allows use of variables in commands.
by coldlavalamp
Download Claim this project
306 downloads
0 likes
0 followers
Updated Oct 14, 2026
0 hypes
Follow0
Server Utility Utility & QoL
Advertisement Remove ads with Premium →

This project is deprecated and will not be maintained or updated. Unless I feel like it. But I probably won't.

This is a server-side Fabric mod that adds variables to commands. You can set a value to a variable and reference it in any command.

 

To set a value to a variable: /var set <variable name> <value>

The value is always stored as text (a string), as commands are inherently text-based, but converted to a number as needed.

 

To reference a variable in a command, write $<variable>. e.g., /gamemode $my_mode

 

Variables can also be used in the 'if' execute subcommand e.g., /execute if var my_num = 5 run kill

You can also operate on variables: e.g., /var operation my_num + 13

 

FABRIC API REQUIRED

var-commands-1.0.0.jar
MC 1.17.1, 1.17, Fabric
Release 2021-11-18 Get

More from coldlavalamp

Advertisement Remove ads with Premium →

You Might Also Like