Skip to content

Commit

Permalink
Fix missing error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Dec 9, 2024
1 parent fd42b12 commit 8771dbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -40,6 +38,7 @@ private static GameResult tryJoinAll(Collection<ServerPlayerEntity> players, Gam
}

public static GameResult handleJoinException(Throwable throwable) {
Plasmid.LOGGER.error("Failed to add player to game space!", throwable);
return GameResult.error(getFeedbackForException(throwable));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ private GameResult accept(Collection<ServerPlayerEntity> 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());
}
}
Expand Down

0 comments on commit 8771dbd

Please sign in to comment.