From 8771dbd0a866340e106b81a3adc1bd93763ecc1f Mon Sep 17 00:00:00 2001 From: Patbox Date: Mon, 9 Dec 2024 22:38:13 +0100 Subject: [PATCH] Fix missing error logging --- .../nucleoid/plasmid/api/game/player/GamePlayerJoiner.java | 7 +++---- .../plasmid/impl/game/manager/ManagedGameSpacePlayers.java | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/xyz/nucleoid/plasmid/api/game/player/GamePlayerJoiner.java b/src/main/java/xyz/nucleoid/plasmid/api/game/player/GamePlayerJoiner.java index e3d16756..b2e82ec5 100644 --- a/src/main/java/xyz/nucleoid/plasmid/api/game/player/GamePlayerJoiner.java +++ b/src/main/java/xyz/nucleoid/plasmid/api/game/player/GamePlayerJoiner.java @@ -4,10 +4,8 @@ import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.Text; import xyz.nucleoid.plasmid.api.event.GameEvents; -import xyz.nucleoid.plasmid.api.game.GameOpenException; -import xyz.nucleoid.plasmid.api.game.GameResult; -import xyz.nucleoid.plasmid.api.game.GameSpace; -import xyz.nucleoid.plasmid.api.game.GameTexts; +import xyz.nucleoid.plasmid.api.game.*; +import xyz.nucleoid.plasmid.impl.Plasmid; import java.util.Collection; import java.util.Set; @@ -40,6 +38,7 @@ private static GameResult tryJoinAll(Collection players, Gam } public static GameResult handleJoinException(Throwable throwable) { + Plasmid.LOGGER.error("Failed to add player to game space!", throwable); return GameResult.error(getFeedbackForException(throwable)); } diff --git a/src/main/java/xyz/nucleoid/plasmid/impl/game/manager/ManagedGameSpacePlayers.java b/src/main/java/xyz/nucleoid/plasmid/impl/game/manager/ManagedGameSpacePlayers.java index 23ff114f..6d88c581 100644 --- a/src/main/java/xyz/nucleoid/plasmid/impl/game/manager/ManagedGameSpacePlayers.java +++ b/src/main/java/xyz/nucleoid/plasmid/impl/game/manager/ManagedGameSpacePlayers.java @@ -90,6 +90,7 @@ private GameResult accept(Collection players, JoinIntent int return GameResult.ok(); } catch (Throwable throwable) { + this.space.getLifecycle().onError(this.space, throwable, "handling LocalJoinAcceptor.Teleport"); return GameResult.error(GameTexts.Join.unexpectedError()); } }