varInt

fun varInt(name: String = UUID.randomUUID().toString()): VarInt(source)

Creates a new scoreboard variable with the given name as player name. If no name is given, a random uuid is used.

This variable is used only to store integers.

Example:

val var1 = namespace.varInt("test")
namespace.onLoad {
if_(var1.eq(0)) {
cmd("say Hello World!")
cmd(var1.set(1))
}
}

See also