mirror of
https://github.com/TotalFreedomMC/TotalFreedomMod.git
synced 2024-06-21 05:20:37 +00:00
28 lines
1.4 KiB
Java
28 lines
1.4 KiB
Java
package me.totalfreedom.totalfreedommod.command;
|
|
|
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
import org.bukkit.ChatColor;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
|
|
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
|
|
@CommandParameters(description = "Check the status of the server, including opped players, admins, etc.", usage = "/<command>", aliases = "ss")
|
|
public class Command_serverstats extends FreedomCommand
|
|
{
|
|
|
|
@Override
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
{
|
|
msg("-==" + ConfigEntry.SERVER_NAME.getString() + " server stats==-", ChatColor.GOLD);
|
|
msg("Total opped players: " + server.getOperators().size(), ChatColor.RED);
|
|
msg("Total admins: " + plugin.al.getAllAdmins().size() + " (" + plugin.al.getActiveAdmins().size() + " active)", ChatColor.BLUE);
|
|
int bans = plugin.im.getIndefBans().size();
|
|
int nameBans = plugin.im.getNameBanCount();
|
|
int uuidBans = plugin.im.getUuidBanCount();
|
|
int ipBans = plugin.im.getIpBanCount();
|
|
msg("Total indefinite ban entries: " + bans + " (" + nameBans + " name bans, " + uuidBans + " UUID bans, and " + ipBans + " IP bans)", ChatColor.GREEN);
|
|
return true;
|
|
}
|
|
} |