mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-17 22:47:42 +01:00
Fix pluralization of /glist player summary
This commit is contained in:
@@ -37,6 +37,7 @@ import java.util.Optional;
|
||||
import net.kyori.adventure.identity.Identity;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.TranslatableComponent;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
public class GlistCommand {
|
||||
@@ -104,19 +105,11 @@ public class GlistCommand {
|
||||
|
||||
private void sendTotalProxyCount(CommandSource target) {
|
||||
int online = server.countConnectedPlayers();
|
||||
target.sendMessage(Identity.nil(), Component.text()
|
||||
.append(Component.text(Integer.toString(online), NamedTextColor.GREEN))
|
||||
.append(Component.space())
|
||||
.append(Component.translatable(
|
||||
online == 1
|
||||
? "velocity.command.glist-player-singular"
|
||||
: "velocity.command.glist-player-plural",
|
||||
NamedTextColor.YELLOW
|
||||
))
|
||||
.append(Component.space())
|
||||
.append(Component.translatable("velocity.command.glist-total-suffix",
|
||||
NamedTextColor.YELLOW))
|
||||
.build());
|
||||
TranslatableComponent msg = online == 1
|
||||
? Component.translatable("velocity.command.glist-player-singular")
|
||||
: Component.translatable("velocity.command.glist-player-plural");
|
||||
target.sendMessage(msg.color(NamedTextColor.YELLOW)
|
||||
.args(Component.text(Integer.toString(online), NamedTextColor.GREEN)));
|
||||
}
|
||||
|
||||
private void sendServerPlayers(CommandSource target, RegisteredServer server, boolean fromAll) {
|
||||
|
||||
@@ -45,9 +45,8 @@ velocity.command.server-tooltip-players-online={0} players online
|
||||
velocity.command.server-tooltip-current-server=Currently connected to this server
|
||||
velocity.command.server-tooltip-offer-connect-server=Click to connect to this server
|
||||
|
||||
velocity.command.glist-player-singular=player
|
||||
velocity.command.glist-player-plural=players
|
||||
velocity.command.glist-total-suffix= are currently connected to the proxy.
|
||||
velocity.command.glist-player-singular={0} player is currently connected to the proxy.
|
||||
velocity.command.glist-player-plural={0} players are currently connected to the proxy.
|
||||
velocity.command.glist-view-all=To view all players on servers, use /glist all.
|
||||
|
||||
velocity.command.reload-success=Velocity configuration successfully reloaded.
|
||||
|
||||
@@ -45,9 +45,8 @@ velocity.command.server-tooltip-players-online=ǝuᴉluo sɹǝʎɐld {0}
|
||||
velocity.command.server-tooltip-current-server=ɹǝʌɹǝs sᴉɥʇ oʇ pǝʇɔǝuuoɔ ʎlʇuǝɹɹnƆ
|
||||
velocity.command.server-tooltip-offer-connect-server=ɹǝʌɹǝs sᴉɥʇ oʇ ʇɔǝuuoɔ oʇ ʞɔᴉlƆ
|
||||
|
||||
velocity.command.glist-player-singular=ɹǝʎɐld
|
||||
velocity.command.glist-player-plural=sɹǝʎɐld
|
||||
velocity.command.glist-total-suffix=˙ʎxoɹd ǝɥʇ oʇ pǝʇɔǝuuoɔ ʎlʇuǝɹɹnɔ ǝɹɐ
|
||||
velocity.command.glist-player-singular=˙ʎxoɹd ǝɥʇ oʇ pǝʇɔǝuuoɔ ʎlʇuǝɹɹnɔ sᴉ ɹǝʎɐld {0}
|
||||
velocity.command.glist-player-plural=˙ʎxoɹd ǝɥʇ oʇ pǝʇɔǝuuoɔ ʎlʇuǝɹɹnɔ ǝɹɐ sɹǝʎɐld {0}
|
||||
velocity.command.glist-view-all=˙/glist all ǝsn 'sɹǝʌɹǝs uo sɹǝʎɐld llɐ ʍǝᴉʌ o┴
|
||||
|
||||
velocity.command.reload-success=˙pǝpɐolǝɹ ʎllnɟssǝɔɔns uoᴉʇɐɹnƃᴉɟuoɔ ʎʇᴉɔolǝΛ
|
||||
|
||||
Reference in New Issue
Block a user