diff --git a/src/main/java/net/fabricmc/fabric/api/server/PlayerStream.java b/src/main/java/net/fabricmc/fabric/api/server/PlayerStream.java index 66e34cb0c..1007e76ea 100644 --- a/src/main/java/net/fabricmc/fabric/api/server/PlayerStream.java +++ b/src/main/java/net/fabricmc/fabric/api/server/PlayerStream.java @@ -42,7 +42,11 @@ public final class PlayerStream { } public static Stream all(MinecraftServer server) { - return server.getPlayerManager().getPlayerList().stream(); + if (server.getPlayerManager() != null) { + return server.getPlayerManager().getPlayerList().stream(); + } else { + return Stream.empty(); + } } public static Stream world(World world) {