mirror of
https://e.coding.net/circlecloud/SimpleEssential.git
synced 2025-11-24 21:36:02 +00:00
@@ -3,8 +3,11 @@
|
||||
*/
|
||||
package cn.citycraft.SimpleEssential.command;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandException;
|
||||
@@ -36,7 +39,15 @@ public class CommandWorld extends BaseCommand {
|
||||
case 0:
|
||||
sender.sendMessage(I18n.p("World.title"));
|
||||
for (final World wd : Bukkit.getWorlds()) {
|
||||
sender.sendMessage(I18n.p("World.info", wd.getName(), wd.getEnvironment().toString(), wd.getLoadedChunks().length, wd.getEntities().size(), wd.getPlayers().size()));
|
||||
int tileEntities = 0;
|
||||
try {
|
||||
for (final Chunk chunk : wd.getLoadedChunks()) {
|
||||
tileEntities += chunk.getTileEntities().length;
|
||||
}
|
||||
} catch (final ClassCastException ex) {
|
||||
org.bukkit.Bukkit.getLogger().log(Level.SEVERE, "无法读取区块信息 错误世界: " + wd, ex);
|
||||
}
|
||||
sender.sendMessage(I18n.p("World.info", wd.getName(), wd.getEnvironment().toString(), wd.getLoadedChunks().length, wd.getEntities().size(), tileEntities, wd.getPlayers().size()));
|
||||
}
|
||||
case 1:
|
||||
final World wd = Bukkit.getWorld(args[1]);
|
||||
|
||||
Reference in New Issue
Block a user