Class Formatter
java.lang.Object
tfagaming.projects.minecraft.homestead.tools.java.Formatter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringapplyPlaceholders(String string, Placeholder placeholder) Apply placeholders to a string.static StringformatPaginationMenuTitle(String title, int currentPage, int totalPages) static StringformatPrivateChat(String regionName, String sender, String message) static StringgetAgo(long time) Get beautiful and readable duration "ago" string.static StringgetBalance(double amount) Get beautiful and readable balance string.static StringgetBoolean(boolean value) static StringgetDate(long date) Get beautiful and readable date timestamp string.static StringgetFlagState(boolean value) static StringgetLocation(org.bukkit.Location location) Get beautiful and readableLocationstring.static StringgetLocationChunk(org.bukkit.Chunk chunk) Get beautiful and readableChunkstring.static StringgetMembersOfRegion(Region region) Get beautiful and readable list of members of a region.static StringgetNever()static StringgetNone()static StringgetPlayerOwnedRegions(org.bukkit.OfflinePlayer player) Get beautiful and readable list of regions that a player owns.static StringgetPlayerPlaytime(org.bukkit.OfflinePlayer player) Get beautiful and readableOfflinePlayer's playtime string.static StringgetPlayerStatus(org.bukkit.OfflinePlayer player) Get the player status; Online, Offline, or server Banned.static StringgetPlayerTrustedRegions(org.bukkit.OfflinePlayer player) Get beautiful and readable list of region that a player is trusted in.static StringgetRating(double rate) Get beautiful and readable rate string.static StringgetRating(int rate) Get beautiful and readable rate string.static StringgetRegionsOfWar(War war) Get beautiful and readable list of regions part of a war.static StringgetRemainingTime(long time) Get beautiful and readable remaining time string.static StringgetToggle(boolean value)
-
Constructor Details
-
Formatter
public Formatter()
-
-
Method Details
-
applyPlaceholders
Apply placeholders to a string.- Parameters:
string- The stringplaceholder- The placeholders
-
getLocation
Get beautiful and readableLocationstring.- Parameters:
location- The location
-
getLocationChunk
Get beautiful and readableChunkstring.- Parameters:
chunk- The chunk
-
getBalance
Get beautiful and readable balance string.- Parameters:
amount- The amount
-
getDate
Get beautiful and readable date timestamp string.- Parameters:
date- The date timestamp
-
getRating
Get beautiful and readable rate string.- Parameters:
rate- The average rating
-
getRating
Get beautiful and readable rate string.- Parameters:
rate- The rate, from 1 to 5.
-
getRemainingTime
Get beautiful and readable remaining time string.- Parameters:
time- The remaining time
-
getPlayerPlaytime
Get beautiful and readableOfflinePlayer's playtime string.- Parameters:
player- The player
-
formatPaginationMenuTitle
-
formatPrivateChat
-
getPlayerOwnedRegions
Get beautiful and readable list of regions that a player owns.- Parameters:
player- The player
-
getPlayerTrustedRegions
Get beautiful and readable list of region that a player is trusted in.- Parameters:
player- The player
-
getMembersOfRegion
Get beautiful and readable list of members of a region.- Parameters:
region- The region
-
getRegionsOfWar
Get beautiful and readable list of regions part of a war.- Parameters:
war- The war
-
getNone
-
getNever
-
getBoolean
-
getToggle
-
getFlagState
-
getPlayerStatus
Get the player status; Online, Offline, or server Banned. -
getAgo
Get beautiful and readable duration "ago" string.- Parameters:
time- The date timestamp
-