Skip to content

Commit

Permalink
Never collect players for big red buttons that are not in a game
Browse files Browse the repository at this point in the history
  • Loading branch information
Gegy committed Nov 2, 2024
1 parent 19fd5ee commit 739d170
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ private void updateRequiredPlayers(int count) {
}

public boolean press(Player player) {
// No game is active, just allow instant trigger
if (IGameManager.get().getGamePhaseAt(level, getBlockPos()) == null) {
applyTriggerEffects();
return true;
}
if (playersPressed.add(player.getUUID())) {
playersPressedCount = playersPressed.size();
markUpdated();
Expand Down

0 comments on commit 739d170

Please sign in to comment.