Skip to content

Java basic data classes

Tki-sor edited this page Jun 18, 2025 · 1 revision

Due to the code block ending, I have escaped the triple backticks as requested.

Java basic data classes

Note, these are not primitive types, but Java basic data classes.

Now you can directly access these basic Java data classes through Integer, Boolean (but not String). Of course, for some reasons, code completion cannot be done via ProbeJS (maybe a wrapper class will be written?).

Also, if you don't know what methods exist, you can use something like IntegerW.of(String s). In kubejs, it is possible:

IntegerW.of(1)  
IntegerW.of("1")  

Because in kubejs, types are not so explicit; for example, 1 is actually "1.00". This wrapper adjusts things to prevent errors caused by receiving such strings.

Clone this wiki locally