If I enter it as a string such as
event.player.give(Item.of('patchouli:guide_book', 1, "{\"patchouli:book\":\"egcraft_light_handbook\"}"))
I get:
[KubeJS Server/]: main.js#8: Error in 'PlayerEvents.loggedIn': dev.latvian.mods.rhino.EvaluatorException: Can't find method dev.latvian.mods.rhino.CachedClassInfo.of(string,number,object).
[KubeJS Server/]: …rhino.EvaluatorException: Can't find method …rhino.CachedClassInfo.of(string,number,object). (server_scripts:main.js#8)
[KubeJS Server/]: at …rhino.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:67)
If I enter it as an object such as
event.player.give(Item.of('patchouli:guide_book', 1, {"patchouli:book":"egcraft_light_handbook"}))
I get:
[KubeJS Server/]: main.js#8: Error in 'PlayerEvents.loggedIn': dev.latvian.mods.rhino.EvaluatorException: Can't find method dev.latvian.mods.rhino.CachedClassInfo.of(string,number,object).
[KubeJS Server/]: …rhino.EvaluatorException: Can't find method …rhino.CachedClassInfo.of(string,number,object). (server_scripts:main.js#8)
[KubeJS Server/]: at …rhino.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:67)
I'm running mincraft 1.21.1 if that makes any difference.