Closed antiphysika closed 3 months ago
1.20.1
2001.6.5-build.7
2.2-build.18
9.2.14
NeoForge-47.1.106
Pretty sure I'm not doing anything cursed but bracing for a reality check just in case :stuck_out_tongue:
With the following script:
PlayerEvents.loggedIn(event => { let clear_player_inventory = (player) => { let inventory = player.inventory inventory.clear() } const { player } = event if (player.stages.has('cleared_initial_inventory')) return console.log(`New player logging in: ${player.name}`) clear_player_inventory(player) player.stages.set('cleared_initial_inventory') })
I'm getting a strange method-not-found error when setting the cleared_initial_inventory player stage:
cleared_initial_inventory
07Jun2024 19:57:06.784] [Server thread/INFO] [KubeJS Server/]: events/player/clear_initial_inventory.js#17: New player logging in: literal{antiphysika} [07Jun2024 19:57:06.795] [Server thread/ERROR] [KubeJS Server/]: events/player/clear_initial_inventory.js#20: Error in 'PlayerEvents.loggedIn': Can't find method dev.latvian.mods.kubejs.stages.Stages.set(string). [07Jun2024 19:57:06.796] [Server thread/ERROR] [KubeJS Server/]: …rhino.EvaluatorException: Can't find method …kubejs.stages.Stages.set(string). (server_scripts:events/player/clear_initial_inventory.js#20) [07Jun2024 19:57:06.796] [Server thread/ERROR] [KubeJS Server/]: at …rhino.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:67) [...]
Logs:
No response
stages.set requires a string and a boolean,
Gahhh. What a numpty. I must've cack-handidly deleted that at some point.
Thank you! And sorry for the noise
Minecraft Version
1.20.1
KubeJS Version
2001.6.5-build.7
Rhino Version
2.2-build.18
Architectury Version
9.2.14
Forge/Fabric Version
NeoForge-47.1.106
Describe your issue
Pretty sure I'm not doing anything cursed but bracing for a reality check just in case :stuck_out_tongue:
With the following script:
I'm getting a strange method-not-found error when setting the
cleared_initial_inventory
player stage:Logs:
Crash report/logs
No response