java.lang.Object
tfagaming.projects.minecraft.homestead.tools.java.Formatter

public final class Formatter extends Object
  • Constructor Details

    • Formatter

      public Formatter()
  • Method Details

    • applyPlaceholders

      public static String applyPlaceholders(String string, Placeholder placeholder)
      Apply placeholders to a string.
      Parameters:
      string - The string
      placeholder - The placeholders
    • getLocation

      public static String getLocation(org.bukkit.Location location)
      Get beautiful and readable Location string.
      Parameters:
      location - The location
    • getLocationChunk

      public static String getLocationChunk(org.bukkit.Chunk chunk)
      Get beautiful and readable Chunk string.
      Parameters:
      chunk - The chunk
    • getBalance

      public static String getBalance(double amount)
      Get beautiful and readable balance string.
      Parameters:
      amount - The amount
    • getDate

      public static String getDate(long date)
      Get beautiful and readable date timestamp string.
      Parameters:
      date - The date timestamp
    • getRating

      public static String getRating(double rate)
      Get beautiful and readable rate string.
      Parameters:
      rate - The average rating
    • getRating

      public static String getRating(int rate)
      Get beautiful and readable rate string.
      Parameters:
      rate - The rate, from 1 to 5.
    • getRemainingTime

      public static String getRemainingTime(long time)
      Get beautiful and readable remaining time string.
      Parameters:
      time - The remaining time
    • getPlayerPlaytime

      public static String getPlayerPlaytime(org.bukkit.OfflinePlayer player)
      Get beautiful and readable OfflinePlayer's playtime string.
      Parameters:
      player - The player
    • formatPaginationMenuTitle

      public static String formatPaginationMenuTitle(String title, int currentPage, int totalPages)
    • formatPrivateChat

      public static String formatPrivateChat(String regionName, String sender, String message)
    • getPlayerOwnedRegions

      public static String getPlayerOwnedRegions(org.bukkit.OfflinePlayer player)
      Get beautiful and readable list of regions that a player owns.
      Parameters:
      player - The player
    • getPlayerTrustedRegions

      public static String getPlayerTrustedRegions(org.bukkit.OfflinePlayer player)
      Get beautiful and readable list of region that a player is trusted in.
      Parameters:
      player - The player
    • getMembersOfRegion

      public static String getMembersOfRegion(Region region)
      Get beautiful and readable list of members of a region.
      Parameters:
      region - The region
    • getRegionsOfWar

      public static String getRegionsOfWar(War war)
      Get beautiful and readable list of regions part of a war.
      Parameters:
      war - The war
    • getNone

      public static String getNone()
    • getNever

      public static String getNever()
    • getBoolean

      public static String getBoolean(boolean value)
    • getToggle

      public static String getToggle(boolean value)
    • getFlagState

      public static String getFlagState(boolean value)
    • getPlayerStatus

      public static String getPlayerStatus(org.bukkit.OfflinePlayer player)
      Get the player status; Online, Offline, or server Banned.
    • getAgo

      public static String getAgo(long time)
      Get beautiful and readable duration "ago" string.
      Parameters:
      time - The date timestamp