Skip to content

Commit

Permalink
fix: handle possible null server registries in playerJoined listener
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Nov 11, 2024
1 parent 6997800 commit c773ba8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/src/main/java/dev/ftb/mods/ftblibrary/FTBLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ private void serverStopped(MinecraftServer server) {
}

private void playerJoined(ServerPlayer player) {
NetworkHelper.sendTo(player, new SyncKnownServerRegistriesPacket(KnownServerRegistries.server));
if (KnownServerRegistries.server != null) {
// can be null, e.g. https://github.com/FTBTeam/FTB-Mods-Issues/issues/1387
NetworkHelper.sendTo(player, new SyncKnownServerRegistriesPacket(KnownServerRegistries.server));
}
}
}

0 comments on commit c773ba8

Please sign in to comment.