output.sendMessage("Could not set generator for world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' is not enabled"); } else { result = plugin.getDefaultWorldGenerator(world, id);
@Override public ChunkGenerator call() throws Exception { return myPlugin.getDefaultWorldGenerator(worldName, generatorID); } }, myPlugin.getName(), "Failed to get the default chunk generator: %s");
@Override public void runCommand(CommandSender sender, List<String> args) { Logging.info("PLEASE IGNORE the 'Plugin X does not contain any generators' message below!"); Plugin[] plugins = this.plugin.getServer().getPluginManager().getPlugins(); List<String> generators = new ArrayList<String>(); for (Plugin p : plugins) { if (p.isEnabled() && p.getDefaultWorldGenerator("world", "") != null) { generators.add(p.getDescription().getName()); } } sender.sendMessage(ChatColor.AQUA + "--- Loaded Generator Plugins ---"); String loadedGens = ""; boolean altColor = false; for (String s : generators) { loadedGens += (altColor ? ChatColor.YELLOW : ChatColor.WHITE) + s + " "; altColor = !altColor; } if (loadedGens.length() == 0) { loadedGens = ChatColor.RED + "No Generator Plugins found."; } sender.sendMessage(loadedGens); } }
output.sendMessage("Could not set generator for world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' is not enabled"); } else { result = plugin.getDefaultWorldGenerator(world, id);