KubeJS (Old)

KubeJS (Old)

3M Downloads

text object not defined when using text.color (as per example code)

BrewingCoder opened this issue ยท 2 comments

commented

Minecraft Version

1.18.2

KubeJS Version

1802.5.1-build.329

Rhino Version

1801.1.9-build.133

Architectury Version

4.1.39

Forge/Fabric Version

40.0.36

Describe your issue

`
onEvent('player.logged_in', event=>{
if(!event.player.stages.has('stupid_welcome')){

    event.server.scheduleInTicks(1,event.server, function(callback){
        callback.data.tell(text.green("Another foo bar welcome message."))
    })

}

});
`

Error:
[18:43:27] [Server thread/ERROR] [KubeJS Server/]: Error occurred while handling scheduled event callback: ReferenceError: "text" is not defined. (server_scripts:startingItems.js#21)

Crash report/logs

No response

commented

The text wrapper has been renamed to Text (like all other wrappers), can you link me the wiki page this is from so I can update it?

commented

Thanks so much max, sorry for the trouble. The reference came from here:

https://mods.latvian.dev/books/kubejs/page/chat-event