#neoforge event usage in kubejs
28 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
it’s the same implementation
yes, thank you
on events?
hm cant find it 
not sure what the syntax is on 1.21
i think its
NativeEvents.onEvent('net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent', event => {
// ...
})
in startup
using the example above gives
Cannot register listeners for abstract class net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent. Register a listener to one of its subclasses instead!
and when using net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent.BossEventProgress
Failed to load Java class 'net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent.BossEventProgress': Class could not be found!
oh its abstract?
got it
wait what its not abstract
public static class CustomizeGuiOverlayEvent.BossEventProgress
extends CustomizeGuiOverlayEvent
implements net.neoforged.bus.api.ICancellableEvent
doing search on the server I found what was missing
ah
fixed code:
NativeEvents.onEvent("net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent$BossEventProgress", event => {
if (event.getBossEvent().getName().getString().contains("Wither")) {
event.setCanceled(true);
}
})
I didn't knew I needed to use $
this blocks wither bar if someone needs it

thanks for the help
and as far I looked there is nothing related to NativeEvents, both wikis
alright, good to know, closing thread