update with latest wiki changes

This commit is contained in:
Luke committed 2024-05-01 11:43:12 +01:00
1 parent 2da360ac0b
commit b5467a112f
5 files changed
+34 -32

No files matched your search

+3 -3
View File
@@ -43,7 +43,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!");
@@ -51,7 +51,7 @@ public class ExampleMod implements ModInitializer, EventRegistrar {
// here an event, we subscribe as usual with the @Subscribe annotation
@Subscribe
public void onGeyserPostInitializeEvent(GeyserPostInitializeEvent eventad {
public void onGeyserPostInitializeEvent(GeyserPostInitializeEvent event) {
LOGGER.info("Geyser started!");
}
}
@@ -77,7 +77,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