Package com.bergerkiller.bukkit.common

Examples of com.bergerkiller.bukkit.common.MessageBuilder.yellow()


          }
        }
      }
      MessageBuilder builder = new MessageBuilder();
      builder.green("There are ").yellow(count).green(" trains on this server (of which ");
      builder.yellow(moving).green(" are moving)");
      builder.newLine().green("There are ").yellow(minecartCount).green(" minecart entities");
      builder.send(sender);
      // Show additional information about owned trains to players
      if (sender instanceof Player) {
        StringBuilder statement = new StringBuilder();
View Full Code Here


    return false;
  }

  public static void list(Player player, String statement) {
    MessageBuilder builder = new MessageBuilder();
    builder.yellow("You are the proud owner of the following trains:");
    builder.newLine().setSeparator(ChatColor.WHITE, " / ");
    boolean found = false;
    for (TrainProperties prop : TrainProperties.getAll()) {
      if (!prop.hasOwnership(player)) {
        continue;
View Full Code Here

    }
  }

  public static void showPathInfo(Player p, IProperties prop) {
    MessageBuilder msg = new MessageBuilder();
    msg.yellow("This ").append(prop.getTypeName());
    final String lastName = prop.getDestination();
    if (LogicUtil.nullOrEmpty(lastName)) {
      msg.append(" is not trying to reach a destination.");
    } else {
      msg.append(" is trying to reach ").green(lastName).newLine();
View Full Code Here

      msg.append(" is not trying to reach a destination.");
    } else {
      msg.append(" is trying to reach ").green(lastName).newLine();
      final PathNode first = PathNode.get(prop.getLastPathNode());
      if (first == null) {
        msg.yellow("It has not yet visited a routing node, so no route is available yet.");
      } else {
        PathNode last = PathNode.get(lastName);
        if (last == null) {
          msg.red("The destination position to reach can not be found!");
        } else {
View Full Code Here

        if (last == null) {
          msg.red("The destination position to reach can not be found!");
        } else {
          // Calculate the exact route taken from first to last
          PathNode[] route = first.findRoute(last);
          msg.yellow("Route: ");
          if (route.length == 0) {
            msg.red(first.getDisplayName() + " /=/ " + last.getDisplayName() + " (not found)");
          } else {
            msg.setSeparator(ChatColor.YELLOW, " -> ");
            for (PathNode node : route) {
View Full Code Here

 
    //warning message not taken
    if (!prop.hasOwners()) {
      message.newLine().yellow("Note: This minecart is not owned, claim it using /cart claim!");
    }
    message.yellow("Picks up nearby items: ").white(prop.canPickup());
    if (prop.hasBlockBreakTypes()) {
      message.newLine().yellow("Breaks blocks: ").white(StringUtil.combineNames(prop.getBlockBreakTypes()));
    }
    message.newLine().yellow("Enter message: ").white((prop.hasEnterMessage() ? prop.getEnterMessage() : "None"));
View Full Code Here

        message(ChatColor.RED + "World already exists!");
      }
    } else {
      showInv();
      MessageBuilder modes = new MessageBuilder();
      modes.yellow("Available environments: ").setIndent(2).setSeparator(ChatColor.YELLOW, " / ");
      for (WorldMode mode : WorldMode.values()) {
        modes.green(mode.getName());
      }
      modes.send(sender);
    }
View Full Code Here

    super(Permission.COMMAND_LISTGEN, "world.listgenerators");
  }

  public void execute() {
    MessageBuilder builder = new MessageBuilder();
    builder.yellow("Available chunk generators:").newLine();
    builder.setIndent(2).setSeparator(ChatColor.WHITE, " / ");
    for (String plugin : WorldManager.getGeneratorPlugins()) {
      builder.green(plugin);
    }
    builder.send(sender);
View Full Code Here

  public void sendWorldsMessage(Collection<String> worlds, String text) {
    MessageBuilder builder = new MessageBuilder();
    builder.green("Worlds ").setSeparator(ChatColor.WHITE, "/");
    for (String world : worlds) {
      builder.yellow(world);
    }
    builder.setSeparator(null).green(" " + text);
    builder.send(this.sender);
  }
View Full Code Here

  public void listPortals(String[] portals) {
    MessageBuilder builder = new MessageBuilder();
    builder.green("[Very near] ").dark_green("[Near] ").yellow("[Far] ");
    builder.red("[Other world] ").dark_red("[Unavailable]").newLine();
    builder.yellow("Available portals: ").white(portals.length, " Portal");
    if (portals.length != 1) builder.append('s');
    if (portals.length > 0) {
      builder.setIndent(2).setSeparator(ChatColor.WHITE, " / ").newLine();
      final Location ploc;
      if (sender instanceof Player) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.