#onForgeEvent
19 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.
Do you have any other questions regarding your issue? Feel free to ask!
Note: You generally should create a new post for unrelated issues.

you can use the global trick to not do so
there should be a macro about this 
anyways
global.someForgeEvent = e => {
// modify the code here and run "/kubejs reload startup_scripts" once you make any changes
console.log('the event triggered!')
}
onForgeEvent('some.forge.event', e => {
global.someForgeEvent(e)
})
ahh okay
global.boneMealEvent = event => {
}
onForgeEvent('net.minecraftforge.event.entity.player.BonemealEvent', event => {
if(event.block.id == 'moss_block') event.setCanceled(true)
console.log('event fired')
global.boneMealEvent(event)
})
trying this
if console log fires i will continueü
because i need to be sure event is firing
ok it is firing nice
twice actually both for client and server
