TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/command/Command_status.java
Video 2698cbf46d Too much shit to list in the commit name
- Removes ancient unused code
- General code cleanup in some places
- Rewrites a few components to use Adventure (testing needed)
- Rewrites a few commands to use more modern Java features like Streams
- Fixes oversight where vanishing still worked by names and not UUIDs
- Removes unused Pterodactyl integration
- Removes AutoEject's IP range banning functionality
- Does some minor cleanup to HTTPD's list & players modules
- Fixes ages-old bug in the AntiSpam that caused it to falsely mute players
2022-11-17 01:34:45 -07:00

30 lines
1.2 KiB
Java

package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH)
@CommandParameters(description = "Shows Minecraft server info, such as authentication status.", usage = "/<command>")
public class Command_status extends FreedomCommand
{
@Override
public boolean run(final CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
msg("For information about TotalFreedomMod, try /tfm", ChatColor.GREEN); // Temporary
msg("Server is currently running with 'online-mode=" + (server.getOnlineMode() ? "true" : "false") + "'.", ChatColor.YELLOW);
msg("Loaded worlds:", ChatColor.BLUE);
int i = 0;
for (World world : server.getWorlds())
{
msg(String.format("World %d: %s - %d players.", i++, world.getName(), world.getPlayers().size()), ChatColor.BLUE);
}
return true;
}
}