Class ChatTools

java.lang.Object
com.palmergames.bukkit.util.ChatTools

public class ChatTools extends Object
Useful function for use with the Minecraft Server chatbox.
Version:
2.0
Author:
Shade (xshade.ca)
  • Constructor Details

    • ChatTools

      public ChatTools()
  • Method Details

    • listArr

      public static String listArr(String[] args, String prefix)
    • list

      public static String list(Collection<String> args)
    • list

      public static String list(Collection<String> args, String prefix)
    • stripColour

      public static String stripColour(String s)
    • formatTitle

      public static String formatTitle(TownyObject object)
      Formats a title for a TownyObject, taking into account that on servers with high max_name_length could end up breaking the math
      Parameters:
      object - TownyObject (town or nation)
      Returns:
      a title bar which won't exceed the allowed length.
    • formatTitle

      public static String formatTitle(String title)
    • formatSubTitle

      public static String formatSubTitle(String subtitle)
    • formatCommand

      public static String formatCommand(String command, String subCommand, String help)
    • formatCommand

      public static String formatCommand(String requirement, String command, String subCommand, String help)
    • formatList

      public static String[] formatList(String title, String subject, List<String> list, String page)
      Parameters:
      title - - Title of the list,
      subject - - Subject of the listing.
      list - - Any list that is in an order of ranking.
      page - - Already formatted TownySettings.getListPageMsg(page,total) handler.
      Returns:
      - Fully formatted output which should be sent to the player.