public class AnnoyingUtility
extends java.lang.Object
| Constructor and Description |
|---|
AnnoyingUtility() |
| Modifier and Type | Method and Description |
|---|---|
static @NotNull java.lang.String |
color(@Nullable java.lang.String message)
Translates
& color codes to ChatColor |
static @NotNull java.lang.String |
formatDouble(double value,
@Nullable java.lang.String pattern)
Formats a
Double value using the given pattern |
static @NotNull java.lang.String |
formatMillis(long value,
@Nullable java.lang.String pattern,
boolean padWithZeros)
Formats a millisecond long using the given pattern
|
static @NotNull java.util.Set<java.lang.String> |
getAllPlayerNames()
Gets a
Set of all player names |
@NotNull java.util.Set<java.lang.String> |
getFileNames(@NotNull AnnoyingPlugin plugin,
@NotNull java.lang.String path)
Gets a
Set of all YML file names in a folder. |
static @NotNull java.util.Set<java.lang.String> |
getOfflinePlayerNames()
Gets a
Set of all offline player names |
static @NotNull java.util.Set<java.lang.String> |
getOnlinePlayerNames()
Gets a
Set of all online player names |
static @Nullable org.bukkit.OfflinePlayer |
getPlayer(@NotNull java.lang.String name)
Gets an
OfflinePlayer from the specified name |
static @NotNull java.lang.String |
getString(@NotNull AnnoyingPlugin plugin,
@NotNull java.lang.String key)
Gets a string from
AnnoyingOptions.messagesFileName with the specified key |
static @NotNull java.util.Set<java.lang.String> |
getWorldNames()
Gets a
Set of all world names |
static @NotNull net.md_5.bungee.api.chat.TextComponent |
jsonToTextComponent(@NotNull com.olliez4.interface4.util.json.components.JSONComponent component)
Converts a
JSONComponent to a TextComponent |
@NotNull
public static @NotNull java.lang.String getString(@NotNull
@NotNull AnnoyingPlugin plugin,
@NotNull
@NotNull java.lang.String key)
AnnoyingOptions.messagesFileName with the specified key
If the string is not found, it will return the key
plugin - the plugin to get the string fromkey - the key of the string@Nullable
public static @Nullable org.bukkit.OfflinePlayer getPlayer(@NotNull
@NotNull java.lang.String name)
OfflinePlayer from the specified namename - the name of the playerOfflinePlayer, or null if not found@NotNull public static @NotNull java.util.Set<java.lang.String> getOnlinePlayerNames()
Set of all online player namesSet of player names@NotNull public static @NotNull java.util.Set<java.lang.String> getOfflinePlayerNames()
Set of all offline player namesSet of player names@NotNull public static @NotNull java.util.Set<java.lang.String> getAllPlayerNames()
Set of all player namesSet of player names@NotNull public static @NotNull java.util.Set<java.lang.String> getWorldNames()
Set of all world namesSet of world names@NotNull
@Contract(value="_ -> new")
public static @NotNull java.lang.String color(@Nullable
@Nullable java.lang.String message)
& color codes to ChatColormessage - the message to translate@NotNull
public static @NotNull java.lang.String formatMillis(long value,
@Nullable
@Nullable java.lang.String pattern,
boolean padWithZeros)
value - the milliseconds to formatpattern - the way in which to format the millisecondspadWithZeros - whether to pad the left hand side of numbers with 0's@NotNull
public static @NotNull java.lang.String formatDouble(double value,
@Nullable
@Nullable java.lang.String pattern)
Double value using the given patternvalue - the Double to formatpattern - the pattern to use@NotNull
public static @NotNull net.md_5.bungee.api.chat.TextComponent jsonToTextComponent(@NotNull
@NotNull com.olliez4.interface4.util.json.components.JSONComponent component)
JSONComponent to a TextComponentcomponent - the JSONComponent to convertTextComponentAnnoyingMessage.getBaseComponents(AnnoyingSender)@NotNull
public @NotNull java.util.Set<java.lang.String> getFileNames(@NotNull
@NotNull AnnoyingPlugin plugin,
@NotNull
@NotNull java.lang.String path)
Set of all YML file names in a folder. If the path is not a folder, an empty Set is returnedplugin - the AnnoyingPlugin to get the folder frompath - the path to the folderSet all YML file names in the folder