#dimension returning undefined

8 messages · Page 1 of 1 (latest)

round cipher
#

Just double checking my sanity at this point, as I know kubejs 1.20.1 is still considered "alpha".
Created a new profile with just kubejs and dependencies to run a script that returns the value of player.level.dimension, and I cannot for the life of me get anything other than undefined. Let me know if more info is needed.

main yokeBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

signal fossilBOT
#

Paste version of example.js from @round cipher

raw trellis
#

check if it is level()

#

and you can get level from event itself

round cipher
#

You are a lifesaver lol

#

event.level.dimension

  • works as intended

event.level().dimension

  • runs the script up till this point and breaks execution with an error

event.player.level.dimension

  • undefined

event.player.level().dimension

  • works as intended
#

I don’t think this is how beans are supposed to work lol, but for now this resolves my problem so I’ll close ticket thanks