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)
Formats a millisecond long using the given pattern
|
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 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@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)
value - the milliseconds to formatpattern - the pattern to use@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)