i whant to use a command but i cant figure what to place in the time so its infinite
currently i use
if (player.hasEffect("night_vision")) {
console.log("got here3")
// Remove night vision if already active
player.removeEffect("night_vision");
player.displayClientMessage(Component.gold('Night Vision: ').append(Component.red('disabled')), true)
} else {
console.log("got here4")
// Apply night vision if not active/
player.addEffect("night_vision" , "infinite", 0, true); // Infinite duration
player.displayClientMessage(Component.gold('Night Vision: ').append(Component.green('enabled')), true)
}
to mention that its a command and the player i defined my problem is in "infinite" i tried Java.loadClass.lang.MAX_VALUE , java.lang.Integer.MAX_VALUE and Integer.MAX_VALUE but all of them gave my errors i do not want to use 9999999 because ive heard that infinite now exists and i wanted to use it

