diff --git a/src/main/java/xyz/nucleoid/plasmid/game/portal/menu/GameMenuEntry.java b/src/main/java/xyz/nucleoid/plasmid/game/portal/menu/GameMenuEntry.java index 35bca8b6..97065d4a 100644 --- a/src/main/java/xyz/nucleoid/plasmid/game/portal/menu/GameMenuEntry.java +++ b/src/main/java/xyz/nucleoid/plasmid/game/portal/menu/GameMenuEntry.java @@ -7,6 +7,7 @@ import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.Text; import xyz.nucleoid.plasmid.game.GameSpace; +import xyz.nucleoid.plasmid.game.portal.GamePortalBackend; import xyz.nucleoid.plasmid.game.portal.game.ConcurrentGamePortalBackend; public record GameMenuEntry( @@ -25,6 +26,11 @@ public int getPlayerCount() { return this.game.getPlayerCount(); } + @Override + public GamePortalBackend.ActionType getActionType() { + return this.game.getActionType(); + } + @Override public void provideGameSpaces(Consumer consumer) { game.provideGameSpaces(consumer); diff --git a/src/main/java/xyz/nucleoid/plasmid/game/portal/menu/MenuEntry.java b/src/main/java/xyz/nucleoid/plasmid/game/portal/menu/MenuEntry.java index cb321df3..ff6c3960 100644 --- a/src/main/java/xyz/nucleoid/plasmid/game/portal/menu/MenuEntry.java +++ b/src/main/java/xyz/nucleoid/plasmid/game/portal/menu/MenuEntry.java @@ -27,6 +27,10 @@ default int getPlayerCount() { return -1; } + default int getSpectatorCount() { + return -1; + } + default GamePortalBackend.ActionType getActionType() { return GamePortalBackend.ActionType.NONE; } @@ -50,7 +54,7 @@ default GuiElement createGuiElement() { } var playerCount = this.getPlayerCount(); - var spectatorCount = this.getPlayerCount(); + var spectatorCount = this.getSpectatorCount(); boolean allowSpace = true; if (playerCount > -1) { diff --git a/src/main/resources/data/plasmid/lang/en_us.json b/src/main/resources/data/plasmid/lang/en_us.json index 8bdb2d39..17fcb078 100644 --- a/src/main/resources/data/plasmid/lang/en_us.json +++ b/src/main/resources/data/plasmid/lang/en_us.json @@ -131,8 +131,8 @@ "text.plasmid.ui.game_join.title": "Join a Game", "text.plasmid.ui.game_join.players": "Currently playing: %s", "text.plasmid.ui.game_join.spectators": "Currently spectating: %s", - "text.plasmid.ui.game_join.action.play": "Click to play", - "text.plasmid.ui.game_join.action.spectate": "Click to spectate", + "text.plasmid.ui.game_join.action.play": "Click to play!", + "text.plasmid.ui.game_join.action.spectate": "Click to spectate!", "statistic.plasmid.games_played": "Games played", "statistic.plasmid.games_won": "Games won", "statistic.plasmid.games_lost": "Games lost",