Server Events
Server Events is a support library for Fabric server development, designed to enhance the Fabric API's limited event system. It offers a Bukkit-like event framework while adhering to Fabric's minimalist philosophy.
The mod doesn't wrap CommandRegistrationCallback and DynamicRegistrySetupCallback from Fabric API.
Installation
- Import this package to your project.
- Add
servereventsto your mod depends.
repositories {
maven "https://mvn.suc.icu"
}
dependencies {
implementation "icu.suc.mc:serverevents:<version>"
}
Since 2.0.0, the groupId has been changed from icu.suc to icu.suc.mc.
Usage
ServerEvents provides a simple API for registering and processing events.
Here is an example of a player modifying broadcast information:
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) ->
Component.literal("[+] ").append(player.getName()));
}
}
Since 2.2.0:
import icu.suc.mc.serverevents.Listener;
import icu.suc.mc.serverevents.ServerEvents;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.Event;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
import org.jetbrains.annotations.NotNull;
public class ExampleMod implements ModInitializer, Listener, ServerEvents.Player.Join.ModifyMessage {
@Override
public void onInitialize() {
ServerEvents.register(this);
}
@Override
public @NotNull Event<?>[] events() {
return new Event[]{ServerEvents.Player.Join.MODIFY_MESSAGE};
}
@Override
public @NotNull Component modifyJoinMessage(@NotNull ServerPlayer player, @NotNull Component message) {
return Component.literal("[+] ").append(player.getName());
}
}
License
This project is licensed under the MIT License © 2025 sucj.
How to Install Server Events (Mod)
Server Events by KKW557 is verified for Fabric, Quilt across Minecraft versions 1.21.10, 1.21.11, 1.21.5, 1.21.7, 1.21.8, 1.21.9, 26.1, 26.1.1 (latest release: 2.2.1+26.1, file size: 73 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21.10, 1.21.11, 1.21.5, 1.21.7, 1.21.8, 1.21.9, 26.1, 26.1.1) and platform (Fabric, Quilt).
- Make sure you have the compatible loader or environment installed for Fabric, Quilt.
- Move the downloaded Server Events file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version- Add
-Dserverevents.disableeventpriorityby @KKW557 in https://github.com/sucj/serverevents/pull/19 - Bump version to 2.2.1 by @KKW557 in https://github.com/sucj/serverevents/pull/20
- Full Changelog**: https://github.com/sucj/serverevents/compare/2.2.0+26.1...2.2.1+26.1
- Add
-Dserverevents.disableeventpriorityby @KKW557 in https://github.com/sucj/serverevents/pull/18 - Bump version to 2.2.1 by @KKW557 in https://github.com/sucj/serverevents/pull/21
- Added
icu.suc.mc.serverevents.ServerEventPriority
- Changed **groupId** from
icu.suctoicu.suc.mc. - Added docs for mixins.
...
EntitySleepEvents.ALLOW_SLEEP_TIME event has been removed [#4930](FabricMC/fabric#4930)