Skip to content

Commit

Permalink
Register fabric EventForwarder events after mod-events
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Feb 22, 2025
1 parent 0b928fb commit 5a0d1de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public class FabricEventForwarder {
public FabricEventForwarder(FabricMod mod) {
this.mod = mod;
this.eventListeners = new ArrayList<>(1);
}

public void init() {
ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> {
this.onPlayerJoin(server, handler.getPlayer());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ public void onInitialize() {
ServerTickEvents.END_SERVER_TICK.register((MinecraftServer server) -> {
if (server == this.serverInstance) this.updateSomePlayers();
});

this.eventForwarder.init();

}

@Override
Expand Down

0 comments on commit 5a0d1de

Please sign in to comment.