getVar / setVar
Syntax for reading and writing Skript variables from Java, and back.
The Variable Bridge works in both directions.
From Java
Inside execute java or a .jv module:
setVar("score", 42);
Object current = getVar("score");
From Skript
command /score:
trigger:
send "%getVar("score")%"
setVar "score" to 0
getVar %string% is an expression, setVar %string% to %objects% is an effect.
Before relying on this in a real script, read ⚠️ Scope Warning — the bridge has an important lifetime limitation.