mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-28 02:54:17 +00:00
Update ListCMD.java
This commit is contained in:
parent
5a7a2c1835
commit
8f55be369f
1 changed files with 2 additions and 11 deletions
|
@ -2,6 +2,7 @@ package dev.plex.command.impl;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
import dev.plex.command.PlexCommand;
|
||||
import dev.plex.util.PlexUtils;
|
||||
import dev.plex.command.annotation.CommandParameters;
|
||||
import dev.plex.command.annotation.CommandPermissions;
|
||||
import dev.plex.hook.VaultHook;
|
||||
|
@ -27,17 +28,7 @@ public class ListCMD extends PlexCommand
|
|||
List<Player> players = Lists.newArrayList(Bukkit.getOnlinePlayers());
|
||||
players.removeIf(PlayerMeta::isVanished);
|
||||
Component list = Component.empty();
|
||||
Component header = Component.text("There " + (players.size() == 1 ? "is" : "are") + " currently").color(NamedTextColor.GRAY)
|
||||
.append(Component.space())
|
||||
.append(Component.text(players.size()).color(NamedTextColor.YELLOW))
|
||||
.append(Component.space())
|
||||
.append(Component.text(players.size() == 1 ? "player" : "players").color(NamedTextColor.GRAY))
|
||||
.append(Component.space())
|
||||
.append(Component.text("online out of").color(NamedTextColor.GRAY))
|
||||
.append(Component.space())
|
||||
.append(Component.text(Bukkit.getMaxPlayers()).color(NamedTextColor.YELLOW))
|
||||
.append(Component.space())
|
||||
.append(Component.text(Bukkit.getMaxPlayers() == 1 ? "player." : "players.").color(NamedTextColor.GRAY));
|
||||
Component header = PlexUtils.messageComponent(players.size() == 1 ? "listHeader" : "listHeaderPlural", players.size(), Bukkit.getMaxPlayers());
|
||||
send(sender, header);
|
||||
if (players.isEmpty())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue