Examples of ChatColor


Examples of org.bukkit.ChatColor

    dataFolder = instance.getDataFolder();
  }

  public void loadChatColorFile(final HashMap<ChatColor, List<String>> hm,
      final File f) {
    ChatColor m = ChatColor.valueOf(f.getName().replace(".txt", "")
        .toUpperCase());
    List<String> l = new ArrayList<String>();
    try {
      BufferedReader list = new BufferedReader(new FileReader(f));
      String p;
View Full Code Here

Examples of org.bukkit.ChatColor

                  continue;
                if (!ChatColor.stripColor(t).equals("(Socket)"))
                  continue;
                if ((meta.getDisplayName().contains("Socket") || fuel
                    .getType().equals(Material.SKULL_ITEM))) {
                  ChatColor socketColor = findColor(t);
                  ChatColor fuelColor = findColor(meta
                      .getDisplayName());
                  if ((fuelColor == socketColor)
                      || (socketColor == null)
                      || (socketColor == ChatColor.RESET)
                      || (socketColor == ChatColor.DARK_PURPLE)
View Full Code Here

Examples of org.bukkit.ChatColor

    if (is == null)
      return;
    Material fuel = is.getType();
    if (!is.hasItemMeta() || !is.getItemMeta().hasDisplayName())
      return;
    ChatColor fuelColor = findColor(is.getItemMeta().getDisplayName());

    ItemStack tool = event.getResult();
    ItemStack oldtool = event.getSource();
    ItemMeta metaold;
    if (oldtool.hasItemMeta())
      metaold = oldtool.getItemMeta();
    else
      metaold = Bukkit.getItemFactory().getItemMeta(oldtool.getType());

    if (!metaold.hasLore()) {
      event.setCancelled(true);
      event.setResult(oldtool);
      return;
    }

    boolean namTest = false;
    for (String n : metaold.getLore())
      if (ChatColor.stripColor(n).equalsIgnoreCase("(Socket)")) {
        namTest = true;
      }
    if (!namTest) {
      event.setResult(event.getSource());
      return;
    }

    tool.addUnsafeEnchantments(oldtool.getEnchantments());

    ItemMeta meta = tool.getItemMeta();
    if (fuel.equals(Material.SKULL_ITEM)) {
      ChatColor color = ChatColor.WHITE;
      if (metaold.hasDisplayName())
        color = findColor(metaold.getDisplayName());
      SkullMeta skull = (SkullMeta) is.getItemMeta();
      String skullName = skull.getOwner();
      if ((skullName == null) || (skullName.trim().length() < 1)) {
View Full Code Here

Examples of org.bukkit.ChatColor

public class WarTagListener implements Listener {
  @EventHandler(priority = EventPriority.HIGHEST)
  public void onNameTag(PlayerReceiveNameTagEvent event) {
    Team team = Team.getTeamByPlayerName(event.getNamedPlayer().getName());
    if (team != null) {
      ChatColor teamColor = team.getKind().getColor();
      event.setTag(teamColor + event.getNamedPlayer().getName());
    }
  }
View Full Code Here

Examples of org.bukkit.ChatColor

    private static String prettify(String message) {
        String trimmed = message.trim();
        String messageColor = Colorizer.parseColors(MESSAGE_COLOUR);
        if (!trimmed.isEmpty()) {
            if (trimmed.charAt(0) == ChatColor.COLOR_CHAR) {
                ChatColor test = ChatColor.getByChar(trimmed.substring(1, 2));
                if (test == null) {
                    message = messageColor + message;
                }
            } else
                message = messageColor + message;
View Full Code Here

Examples of org.bukkit.ChatColor

                    page = numpages;
                } else if (page < 1) {
                    page = 1;
                }
               
                ChatColor g = ChatColor.GREEN, w = ChatColor.WHITE, r = ChatColor.RED;
               
                int start = 8 * (page - 1);
                sender.sendMessage(ChatColor.RED + "[==== " + ChatColor.GREEN + "Page " + page + " of " + numpages + ChatColor.RED + " ====]");
                for (int i = start; i < start + 8 && i < dump.size(); ++i) {
                    PermissionAttachmentInfo info = dump.get(i);
View Full Code Here

Examples of org.bukkit.ChatColor

    drawRect(2, this.height - 14, this.width - 2, this.height - 2, Integer.MIN_VALUE);
    this.inputField.drawTextBox();
    // Spout Start
    if (Configuration.isShowingChatColorAssist()) {
      for(int c = 0; c < 16; c++) {
        ChatColor value = ChatColor.getByCode(c);
        String name = value.name().toLowerCase();
        boolean lastUnderscore = true;
        String parsedName = "";
        for(int chr = 0; chr < name.length(); chr++) {
          char ch = name.charAt(chr);
          if(lastUnderscore) {
View Full Code Here

Examples of org.bukkit.ChatColor

        double maxHealth = entity.getMaxHealth();
        double currentHealth = Math.max(entity.getHealth() - damage, 0);
        double healthPercentage = (currentHealth / maxHealth) * 100.0D;

        int fullDisplay;
        ChatColor color = ChatColor.BLACK;
        String symbol;

        switch (profile.getMobHealthbarType()) {
            case HEARTS:
                fullDisplay = Math.min((int) (maxHealth / 2), 10);
View Full Code Here

Examples of org.bukkit.ChatColor

                        sender.sendMessage(ChatColor.RED + "Valid values for option " + option + " are: true and false");
                    }
                } else {
                    String value = args[4].toLowerCase();
                    if (option.equals("color")) {
                        ChatColor color = TEAMS_OPTION_COLOR.get(value);
                        if (color == null) {
                            sender.sendMessage(ChatColor.RED + "Valid values for option color are: " + stringCollectionToString(TEAMS_OPTION_COLOR.keySet()));
                            return false;
                        }
                        team.setPrefix(color.toString());
                        team.setSuffix(ChatColor.RESET.toString());
                    } else {
                        if (!value.equals("true") && !value.equals("false")) {
                            sender.sendMessage(ChatColor.RED + "Valid values for option " + option + " are: true and false");
                            return false;
View Full Code Here

Examples of org.bukkit.ChatColor

    }

    public void chat(String sourcePlayer, String message)
    {
        Server serv = Residence.getServ();
        ChatColor color = Residence.getConfigManager().getChatColor();
        ResidenceChatEvent cevent = new ResidenceChatEvent(Residence.getResidenceManager().getByName(name),serv.getPlayer(sourcePlayer),message,color);
        Residence.getServ().getPluginManager().callEvent(cevent);
        if(cevent.isCancelled())
            return;
        for(String member : members)
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.