update event docs (#264)

This commit is contained in:
chris authored and GitHub committed 2024-04-22 19:38:14 +02:00
1 parent 58fd2b6dde
commit 95d2d72a6b
1 file changed
+2 -2
+2 -2
View File
@@ -42,7 +42,7 @@ public class ExampleMod implements ModInitializer, EventRegistrar {
@Override
public void onInitialize() {
ServerLifecycleEvents.SERVER_STARTING.register((server) -> {
GeyserApi.api().eventBus().register(this, ExampleMod.class); // register your mod & this class as a listener
GeyserApi.api().eventBus().register(this, this); // register your mod & this class instance as a listener
});
LOGGER.info("Geyser is cool!");
@@ -76,7 +76,7 @@ public class ExamplePlugin extends JavaPlugin implements EventRegistrar {
@Override
public void onEnable(){
getLogger().info("Registering Geyser event bus!");
GeyserApi.api().eventBus().register(this, this); // register your plugin & this class as a listener
GeyserApi.api().eventBus().register(this, this); // register your plugin & this class instance as a listener
}
// here an event, we subscribe as usual with the @Subscribe annotation