private boolean listWorlds(CommandSender sender, String[] args) { int i = 1; for (World world : plugin.getServer().getWorlds()) { WorldInstance instance = plugin.getWorldInstance(world); String s = "World " + i + ": " + world.getName(); if (instance != null) { s += " instance of " + instance.getBase().getName(); } sender.sendMessage(s); i++; } return true; }