ServerEvents
ServerEvents is a support library for Fabric server development that significantly extends the capabilities of the standard Fabric API event system. The module provides a convenient event handling framework similar to the Bukkit approach, while maintaining Fabric's minimalist philosophy.
A key feature is that the mod does not duplicate the functionality of CommandRegistrationCallback and DynamicRegistrySetupCallback from the standard Fabric API.

Installation
- Add the package to your project using the jitpack.io service
- Specify dependency on
servereventsin your mod's configuration file
Practical Application
ServerEvents offers an intuitive interface for registering and processing various game events.
Here is an example implementation where a player's welcome message is modified and an apple is given upon joining the server:
import net.fabricmc.api.ModInitializer;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.Items;
import icu.suc.mc.serverevents.ServerEvents;
public class ExampleMod implements ModInitializer {
@Override
public void onInitialize() {
ServerEvents.Player.MODIFY_JOIN_MESSAGE.register((player, message) -> {
player.getInventory().add(Items.APPLE.getDefaultInstance());
return Component.literal("[+] ").append(player.getName());
});
}
}
// Comment: player join event handler
Additional Information:
- Detailed API technical documentation is available
- Various types of server events are supported
- Integration with the existing Fabric ecosystem