public final class ChatUtils extends Object
| Constructor and Description |
|---|
ChatUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
applyPlaceholders(String s,
org.bukkit.OfflinePlayer player)
Sets placeholders to string, if PlaceholderAPI is installed
|
static @NotNull String |
format(@NotNull String message,
@NotNull List<Pair<String,String>> format)
Format a message
|
static @NotNull String |
format(@NotNull String message,
@NotNull Pair<String,String> pair) |
static @NotNull String |
format(@NotNull String message,
String key,
String value) |
static @NotNull org.bukkit.Color |
forRGB(int r,
int g,
int b) |
static @NotNull org.bukkit.Color |
getColorFromHexString(@NotNull String hex)
Converts hex String to Bukkit Color
|
static @NotNull List<String> |
parse(@NotNull List<String> l)
Parse color symbols in string list
|
static @NotNull String |
parse(String s)
Parse color symbols in string
|
static void |
sendMessage(@NotNull org.bukkit.command.CommandSender sendFor,
net.md_5.bungee.api.chat.BaseComponent message)
Sends basecompontent-message to CommandSender
|
static void |
sendMessage(@NotNull org.bukkit.command.CommandSender sendFor,
@NotNull String message)
Sends message to CommandSender
|
static void |
sendMessage(@NotNull org.bukkit.entity.Player sendFor,
net.md_5.bungee.api.chat.BaseComponent message)
Sends basecompontent-message to Player
|
static void |
sendMessage(@NotNull org.bukkit.entity.Player sendFor,
net.md_5.bungee.api.chat.BaseComponent message,
net.md_5.bungee.api.ChatMessageType pos)
Sends basecompontent-message to Player with message position support
|
static void |
sendMessage(@NotNull org.bukkit.entity.Player sendFor,
String message)
Sends message to Player
|
static void |
sendMessage(@NotNull org.bukkit.entity.Player sendFor,
String message,
net.md_5.bungee.api.ChatMessageType pos)
Sends message to Player with message position support
|
@NotNull public static @NotNull String parse(String s)
s - - string for parse@Contract(value="_ -> new")
@NotNull
public static @NotNull org.bukkit.Color getColorFromHexString(@NotNull
@NotNull String hex)
hex - String with hex code (#000000)Color@Contract(value="_, _, _ -> new",
pure=true)
@NotNull
public static @NotNull org.bukkit.Color forRGB(int r,
int g,
int b)
@NotNull public static @NotNull List<String> parse(@NotNull @NotNull List<String> l)
l - - string list for parsepublic static String applyPlaceholders(String s, org.bukkit.OfflinePlayer player)
s - String in which placeholders will be setplayer - OfflinePlayer for placeholders data@NotNull public static @NotNull String format(@NotNull @NotNull String message, @NotNull @NotNull List<Pair<String,String>> format)
@NotNull public static @NotNull String format(@NotNull @NotNull String message, @NotNull @NotNull Pair<String,String> pair)
@Contract(pure=true) @NotNull public static @NotNull String format(@NotNull @NotNull String message, String key, String value)
public static void sendMessage(@NotNull
@NotNull org.bukkit.command.CommandSender sendFor,
@NotNull
@NotNull String message)
sendFor - CommandSender to whom the message will be sentmessage - String message which will be sended;public static void sendMessage(@NotNull
@NotNull org.bukkit.entity.Player sendFor,
String message)
sendFor - Player to whom the message will be sentmessage - String message which will be sended;public static void sendMessage(@NotNull
@NotNull org.bukkit.command.CommandSender sendFor,
net.md_5.bungee.api.chat.BaseComponent message)
sendFor - CommandSender to whom the message will be sentmessage - BaseComponent basecompontent-message which will be sended; Support HoverEffects, ClickableEvent etc.public static void sendMessage(@NotNull
@NotNull org.bukkit.entity.Player sendFor,
net.md_5.bungee.api.chat.BaseComponent message)
sendFor - Player to whom the message will be sentmessage - BaseComponent basecompontent-message which will be sended; Support HoverEffects, ClickableEvent etc.public static void sendMessage(@NotNull
@NotNull org.bukkit.entity.Player sendFor,
net.md_5.bungee.api.chat.BaseComponent message,
net.md_5.bungee.api.ChatMessageType pos)
sendFor - Player to whom the message will be sentmessage - BaseComponent basecompontent-message which will be sended; Support HoverEffects, ClickableEvent etc.pos - ChatMessageType position in which message will be showedpublic static void sendMessage(@NotNull
@NotNull org.bukkit.entity.Player sendFor,
String message,
net.md_5.bungee.api.ChatMessageType pos)
sendFor - Player to whom the message will be sentmessage - BaseComponent message which will be sended; Support HoverEffects, ClickableEvent etc.pos - ChatMessageType position in which message will be showedCopyright © 2023. All rights reserved.