forked from zhdev/griefus
Add MiniMessage support
This commit is contained in:
parent
398a46dee0
commit
c5bfb3c0d9
5 changed files with 99 additions and 46 deletions
2
pom.xml
2
pom.xml
|
|
@ -218,7 +218,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.papermc.paper</groupId>
|
<groupId>io.papermc.paper</groupId>
|
||||||
<artifactId>paper-api</artifactId>
|
<artifactId>paper-api</artifactId>
|
||||||
<version>1.21.1-R0.1-SNAPSHOT</version>
|
<version>1.21.11-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ public class SpigotHandler extends SpigotAdapter implements SpigotInterface {
|
||||||
public static ChatColor DARK_AQUA = ChatColor.of("#31b0e8");
|
public static ChatColor DARK_AQUA = ChatColor.of("#31b0e8");
|
||||||
|
|
||||||
public SpigotHandler() {
|
public SpigotHandler() {
|
||||||
Color.DARK_AQUA = SpigotHandler.DARK_AQUA.toString();
|
//Color.DARK_AQUA = SpigotHandler.DARK_AQUA.toString();
|
||||||
|
Color.DARK_AQUA = "<#31b0e8>"; // griefus
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -26,24 +26,32 @@ public final class Chat {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendComponent(CommandSender sender, String string, String bypass) {
|
public static void sendComponent(CommandSender sender, String string, String bypass) {
|
||||||
SpigotAdapter.ADAPTER.sendComponent(sender, string, bypass);
|
//SpigotAdapter.ADAPTER.sendComponent(sender, string, bypass);
|
||||||
|
sendMessage(sender, string + bypass); // griefus
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendComponent(CommandSender sender, String string) {
|
public static void sendComponent(CommandSender sender, String string) {
|
||||||
sendComponent(sender, string, null);
|
//sendComponent(sender, string, null);
|
||||||
|
sendMessage(sender, string); // griefus
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendMessage(CommandSender sender, String message) {
|
public static void sendMessage(CommandSender sender, String message) {
|
||||||
|
// griefus start
|
||||||
|
try {
|
||||||
|
MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||||
|
sender.sendMessage(miniMessage.deserialize(message));
|
||||||
|
return;
|
||||||
|
} catch (ParsingException ignored) {
|
||||||
|
ignored.printStackTrace();
|
||||||
|
}
|
||||||
|
// griefus end
|
||||||
|
|
||||||
if (sender instanceof ConsoleCommandSender) {
|
if (sender instanceof ConsoleCommandSender) {
|
||||||
message = message.replace(Color.DARK_AQUA, ChatColor.DARK_AQUA.toString());
|
message = message.replace(Color.DARK_AQUA, ChatColor.DARK_AQUA.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
sender.sendMessage(message);
|
||||||
MiniMessage miniMessage = MiniMessage.miniMessage();
|
|
||||||
sender.sendMessage(miniMessage.deserialize(message));
|
|
||||||
} catch (ParsingException e) {
|
|
||||||
sender.sendMessage(message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendConsoleMessage(String string) {
|
public static void sendConsoleMessage(String string) {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package net.coreprotect.utility;
|
||||||
|
|
||||||
import net.coreprotect.language.Phrase;
|
import net.coreprotect.language.Phrase;
|
||||||
import net.coreprotect.language.Selector;
|
import net.coreprotect.language.Selector;
|
||||||
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
import org.bukkit.command.ConsoleCommandSender;
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
|
@ -17,7 +18,8 @@ public class ChatUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCoordinates(String command, int worldId, int x, int y, int z, boolean displayWorld, boolean italic) {
|
public static String getCoordinates(String command, int worldId, int x, int y, int z, boolean displayWorld, boolean italic) {
|
||||||
StringBuilder message = new StringBuilder(Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND);
|
//StringBuilder message = new StringBuilder(Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND);
|
||||||
|
StringBuilder message = new StringBuilder("<click:run_command:\""); // griefus
|
||||||
|
|
||||||
StringBuilder worldDisplay = new StringBuilder();
|
StringBuilder worldDisplay = new StringBuilder();
|
||||||
if (displayWorld) {
|
if (displayWorld) {
|
||||||
|
|
@ -26,12 +28,18 @@ public class ChatUtils {
|
||||||
|
|
||||||
// command
|
// command
|
||||||
DecimalFormat decimalFormat = new DecimalFormat("#.##", new DecimalFormatSymbols(Locale.ROOT));
|
DecimalFormat decimalFormat = new DecimalFormat("#.##", new DecimalFormatSymbols(Locale.ROOT));
|
||||||
message.append("|/" + command + " teleport wid:" + worldId + " " + decimalFormat.format(x + 0.50) + " " + y + " " + decimalFormat.format(z + 0.50) + "|");
|
//message.append("|/" + command + " teleport wid:" + worldId + " " + decimalFormat.format(x + 0.50) + " " + y + " " + decimalFormat.format(z + 0.50) + "|");
|
||||||
|
|
||||||
|
// griefus start
|
||||||
|
String commandLine = "/" + command + " teleport wid:" + worldId + " " + decimalFormat.format(x + 0.50) + " " + y + " " + decimalFormat.format(z + 0.50) + "|";
|
||||||
|
message.append(commandLine + "\"><hover:show_text:\"" + escape(commandLine) + "\">");
|
||||||
|
// griefus end
|
||||||
|
|
||||||
// chat output
|
// chat output
|
||||||
message.append(Color.GREY + (italic ? Color.ITALIC : "") + "(x" + x + "/y" + y + "/z" + z + worldDisplay.toString() + ")");
|
message.append(Color.GREY + (italic ? Color.ITALIC : "") + "(x" + x + "/y" + y + "/z" + z + worldDisplay.toString() + ")");
|
||||||
|
|
||||||
return message.append(Chat.COMPONENT_TAG_CLOSE).toString();
|
//return message.append(Chat.COMPONENT_TAG_CLOSE).toString();
|
||||||
|
return message.append("</hover></click>").toString(); // griefus
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getPageNavigation(String command, int page, int totalPages) {
|
public static String getPageNavigation(String command, int page, int totalPages) {
|
||||||
|
|
@ -41,21 +49,24 @@ public class ChatUtils {
|
||||||
String backArrow = "";
|
String backArrow = "";
|
||||||
if (page > 1) {
|
if (page > 1) {
|
||||||
backArrow = "◀ ";
|
backArrow = "◀ ";
|
||||||
backArrow = Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + (page - 1) + "|" + backArrow + Chat.COMPONENT_TAG_CLOSE;
|
//backArrow = Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + (page - 1) + "|" + backArrow + Chat.COMPONENT_TAG_CLOSE;
|
||||||
|
backArrow = "<click:run_command:/" + command + " l " + (page - 1) + ">" + backArrow + "</click>"; // griefus
|
||||||
}
|
}
|
||||||
|
|
||||||
// next arrow
|
// next arrow
|
||||||
String nextArrow = " ";
|
String nextArrow = " ";
|
||||||
if (page < totalPages) {
|
if (page < totalPages) {
|
||||||
nextArrow = " ▶ ";
|
nextArrow = " ▶ ";
|
||||||
nextArrow = Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + (page + 1) + "|" + nextArrow + Chat.COMPONENT_TAG_CLOSE;
|
//nextArrow = Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + (page + 1) + "|" + nextArrow + Chat.COMPONENT_TAG_CLOSE;
|
||||||
|
nextArrow = "<click:run_command:/" + command + " l " + (page + 1) + ">" + nextArrow + "</click>"; // griefus
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder pagination = new StringBuilder();
|
StringBuilder pagination = new StringBuilder();
|
||||||
if (totalPages > 1) {
|
if (totalPages > 1) {
|
||||||
pagination.append(Color.GREY + "(");
|
pagination.append(Color.GREY + "(");
|
||||||
if (page > 3) {
|
if (page > 3) {
|
||||||
pagination.append(Color.WHITE + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + 1 + "|" + "1 " + Chat.COMPONENT_TAG_CLOSE);
|
//pagination.append(Color.WHITE + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + 1 + "|" + "1 " + Chat.COMPONENT_TAG_CLOSE);
|
||||||
|
pagination.append(Color.WHITE + "<click:run_command:/").append(command).append(" l ").append(1).append(">").append("1 </click>"); //griefus
|
||||||
if (page > 4 && totalPages > 7) {
|
if (page > 4 && totalPages > 7) {
|
||||||
pagination.append(Color.GREY + "... ");
|
pagination.append(Color.GREY + "... ");
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +110,8 @@ public class ChatUtils {
|
||||||
|
|
||||||
for (int displayPage = displayStart; displayPage <= displayEnd; displayPage++) {
|
for (int displayPage = displayStart; displayPage <= displayEnd; displayPage++) {
|
||||||
if (page != displayPage) {
|
if (page != displayPage) {
|
||||||
pagination.append(Color.WHITE + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + displayPage + "|" + displayPage + (displayPage < totalPages ? " " : "") + Chat.COMPONENT_TAG_CLOSE);
|
//pagination.append(Color.WHITE + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + displayPage + "|" + displayPage + (displayPage < totalPages ? " " : "") + Chat.COMPONENT_TAG_CLOSE);
|
||||||
|
pagination.append(Color.WHITE + "<click:run_command:/" + command + " l " + displayPage + ">" + displayPage + (displayPage < totalPages ? " " : "") + "</click>"); // griefus
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pagination.append(Color.WHITE + Color.UNDERLINE + displayPage + Color.RESET + (displayPage < totalPages ? " " : ""));
|
pagination.append(Color.WHITE + Color.UNDERLINE + displayPage + Color.RESET + (displayPage < totalPages ? " " : ""));
|
||||||
|
|
@ -117,7 +129,8 @@ public class ChatUtils {
|
||||||
pagination.append(Color.GREY + "| ");
|
pagination.append(Color.GREY + "| ");
|
||||||
}
|
}
|
||||||
if (page != totalPages) {
|
if (page != totalPages) {
|
||||||
pagination.append(Color.WHITE + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + totalPages + "|" + totalPages + Chat.COMPONENT_TAG_CLOSE);
|
//pagination.append(Color.WHITE + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_COMMAND + "|/" + command + " l " + totalPages + "|" + totalPages + Chat.COMPONENT_TAG_CLOSE);
|
||||||
|
pagination.append(Color.WHITE + "<click:run_command:/" + command + " l " + totalPages + ">" + totalPages + "</click>"); // griefus
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pagination.append(Color.WHITE + Color.UNDERLINE + totalPages);
|
pagination.append(Color.WHITE + Color.UNDERLINE + totalPages);
|
||||||
|
|
@ -163,7 +176,8 @@ public class ChatUtils {
|
||||||
Date logDate = new Date(resultTime * 1000L);
|
Date logDate = new Date(resultTime * 1000L);
|
||||||
String formattedTimestamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z").format(logDate);
|
String formattedTimestamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z").format(logDate);
|
||||||
|
|
||||||
return Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP + "|" + Color.GREY + formattedTimestamp + "|" + Color.GREY + message.toString() + Chat.COMPONENT_TAG_CLOSE;
|
//return Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP + "|" + Color.GREY + formattedTimestamp + "|" + Color.GREY + message.toString() + Chat.COMPONENT_TAG_CLOSE;
|
||||||
|
return "<hover:show_text:\"<gray>" + escape(formattedTimestamp) + "</gray>\"><gray>" + message + "</hover>"; // griefus
|
||||||
}
|
}
|
||||||
|
|
||||||
return message.toString();
|
return message.toString();
|
||||||
|
|
@ -174,19 +188,27 @@ public class ChatUtils {
|
||||||
return phrase;
|
return phrase;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder message = new StringBuilder(Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP);
|
//StringBuilder message = new StringBuilder(Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP);
|
||||||
|
StringBuilder message = new StringBuilder("<hover:show_text:"); // griefus
|
||||||
|
|
||||||
// tooltip
|
// tooltip
|
||||||
message.append("|" + tooltip.replace("|", Chat.COMPONENT_PIPE) + "|");
|
//message.append("|" + tooltip.replace("|", Chat.COMPONENT_PIPE) + "|");
|
||||||
|
message.append(escape(tooltip)); // griefus
|
||||||
|
|
||||||
// chat output
|
// chat output
|
||||||
message.append(phrase);
|
message.append(phrase);
|
||||||
|
|
||||||
return message.append(Chat.COMPONENT_TAG_CLOSE).toString();
|
//return message.append(Chat.COMPONENT_TAG_CLOSE).toString();
|
||||||
|
return message.append("</hover>").toString(); // griefus
|
||||||
}
|
}
|
||||||
|
|
||||||
// This theoretically initializes the component code, to prevent gson adapter errors
|
// This theoretically initializes the component code, to prevent gson adapter errors
|
||||||
public static void sendConsoleComponentStartup(ConsoleCommandSender consoleSender, String string) {
|
public static void sendConsoleComponentStartup(ConsoleCommandSender consoleSender, String string) {
|
||||||
Chat.sendComponent(consoleSender, Color.RESET + "[Griefus] " + string + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP + "| | " + Chat.COMPONENT_TAG_CLOSE);
|
//Chat.sendComponent(consoleSender, Color.RESET + "[Griefus] " + string + Chat.COMPONENT_TAG_OPEN + Chat.COMPONENT_POPUP + "| | " + Chat.COMPONENT_TAG_CLOSE);
|
||||||
|
Chat.sendComponent(consoleSender, Color.RESET + "[Griefus] " + MiniMessage.miniMessage().stripTags(string)); // griefus
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String escape(String string) {
|
||||||
|
return MiniMessage.miniMessage().escapeTags(string).replace("\"", "\\");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package net.coreprotect.utility;
|
package net.coreprotect.utility;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
//import org.bukkit.ChatColor;
|
||||||
|
|
||||||
public final class Color {
|
public final class Color {
|
||||||
|
|
||||||
|
|
@ -10,112 +10,134 @@ public final class Color {
|
||||||
/**
|
/**
|
||||||
* Represents black.
|
* Represents black.
|
||||||
*/
|
*/
|
||||||
public static final String BLACK = ChatColor.BLACK.toString();
|
//public static final String BLACK = ChatColor.BLACK.toString();
|
||||||
|
public static final String BLACK = "<black>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents dark blue.
|
* Represents dark blue.
|
||||||
*/
|
*/
|
||||||
public static final String DARK_BLUE = ChatColor.DARK_BLUE.toString();
|
//public static final String DARK_BLUE = ChatColor.DARK_BLUE.toString();
|
||||||
|
public static final String DARK_BLUE = "<dark_blue>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents dark green.
|
* Represents dark green.
|
||||||
*/
|
*/
|
||||||
public static final String DARK_GREEN = ChatColor.DARK_GREEN.toString();
|
//public static final String DARK_GREEN = ChatColor.DARK_GREEN.toString();
|
||||||
|
public static final String DARK_GREEN = "<dark_green>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents dark blue (aqua).
|
* Represents dark blue (aqua).
|
||||||
*/
|
*/
|
||||||
public static String DARK_AQUA = ChatColor.DARK_AQUA.toString();
|
//public static String DARK_AQUA = ChatColor.DARK_AQUA.toString();
|
||||||
|
public static String DARK_AQUA = "<dark_aqua>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents dark red.
|
* Represents dark red.
|
||||||
*/
|
*/
|
||||||
public static final String DARK_RED = ChatColor.DARK_RED.toString();
|
//public static final String DARK_RED = ChatColor.DARK_RED.toString();
|
||||||
|
public static final String DARK_RED = "<dark_red>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents dark purple.
|
* Represents dark purple.
|
||||||
*/
|
*/
|
||||||
public static final String DARK_PURPLE = ChatColor.DARK_PURPLE.toString();
|
//public static final String DARK_PURPLE = ChatColor.DARK_PURPLE.toString();
|
||||||
|
public static final String DARK_PURPLE = "<dark_purple>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents gold.
|
* Represents gold.
|
||||||
*/
|
*/
|
||||||
public static final String GOLD = ChatColor.GOLD.toString();
|
//public static final String GOLD = ChatColor.GOLD.toString();
|
||||||
|
public static final String GOLD = "<gold>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents grey.
|
* Represents grey.
|
||||||
*/
|
*/
|
||||||
public static final String GREY = ChatColor.GRAY.toString();
|
//public static final String GREY = ChatColor.GRAY.toString();
|
||||||
|
public static final String GREY = "<gray>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents dark grey.
|
* Represents dark grey.
|
||||||
*/
|
*/
|
||||||
public static final String DARK_GREY = ChatColor.DARK_GRAY.toString();
|
//public static final String DARK_GREY = ChatColor.DARK_GRAY.toString();
|
||||||
|
public static final String DARK_GREY = "<dark_gray>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents blue.
|
* Represents blue.
|
||||||
*/
|
*/
|
||||||
public static final String BLUE = ChatColor.BLUE.toString();
|
//public static final String BLUE = ChatColor.BLUE.toString();
|
||||||
|
public static final String BLUE = "<blue>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents green.
|
* Represents green.
|
||||||
*/
|
*/
|
||||||
public static final String GREEN = ChatColor.GREEN.toString();
|
//public static final String GREEN = ChatColor.GREEN.toString();
|
||||||
|
public static final String GREEN = "<green>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents aqua.
|
* Represents aqua.
|
||||||
*/
|
*/
|
||||||
public static final String AQUA = ChatColor.AQUA.toString();
|
//public static final String AQUA = ChatColor.AQUA.toString();
|
||||||
|
public static final String AQUA = "<aqua>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents red.
|
* Represents red.
|
||||||
*/
|
*/
|
||||||
public static final String RED = ChatColor.RED.toString();
|
//public static final String RED = ChatColor.RED.toString();
|
||||||
|
public static final String RED = "<red>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents light purple.
|
* Represents light purple.
|
||||||
*/
|
*/
|
||||||
public static final String LIGHT_PURPLE = ChatColor.LIGHT_PURPLE.toString();
|
//public static final String LIGHT_PURPLE = ChatColor.LIGHT_PURPLE.toString();
|
||||||
|
public static final String LIGHT_PURPLE = "<light_purple>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents yellow.
|
* Represents yellow.
|
||||||
*/
|
*/
|
||||||
public static final String YELLOW = ChatColor.YELLOW.toString();
|
//public static final String YELLOW = ChatColor.YELLOW.toString();
|
||||||
|
public static final String YELLOW = "<yellow>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents white.
|
* Represents white.
|
||||||
*/
|
*/
|
||||||
public static final String WHITE = ChatColor.WHITE.toString();
|
//public static final String WHITE = ChatColor.WHITE.toString();
|
||||||
|
public static final String WHITE = "<white>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents magical characters that change around randomly.
|
* Represents magical characters that change around randomly.
|
||||||
*/
|
*/
|
||||||
public static final String MAGIC = ChatColor.COLOR_CHAR + "k";
|
//public static final String MAGIC = ChatColor.COLOR_CHAR + "k";
|
||||||
|
public static final String MAGIC = "<obfuscated>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the text bold.
|
* Makes the text bold.
|
||||||
*/
|
*/
|
||||||
public static final String BOLD = ChatColor.COLOR_CHAR + "l";
|
//public static final String BOLD = ChatColor.COLOR_CHAR + "l";
|
||||||
|
public static final String BOLD = "<bold>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes a line appear through the text.
|
* Makes a line appear through the text.
|
||||||
*/
|
*/
|
||||||
public static final String STRIKETHROUGH = ChatColor.COLOR_CHAR + "m";
|
//public static final String STRIKETHROUGH = ChatColor.COLOR_CHAR + "m";
|
||||||
|
public static final String STRIKETHROUGH = "<strikethrough>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the text appear underlined.
|
* Makes the text appear underlined.
|
||||||
*/
|
*/
|
||||||
public static final String UNDERLINE = ChatColor.COLOR_CHAR + "n";
|
//public static final String UNDERLINE = ChatColor.COLOR_CHAR + "n";
|
||||||
|
public static final String UNDERLINE = "<underlined>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the text italic.
|
* Makes the text italic.
|
||||||
*/
|
*/
|
||||||
public static final String ITALIC = ChatColor.COLOR_CHAR + "o";
|
//public static final String ITALIC = ChatColor.COLOR_CHAR + "o";
|
||||||
|
public static final String ITALIC = "<italic>"; // griefus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets all previous chat colors or formats.
|
* Resets all previous chat colors or formats.
|
||||||
*/
|
*/
|
||||||
public static final String RESET = ChatColor.COLOR_CHAR + "r";
|
//public static final String RESET = ChatColor.COLOR_CHAR + "r";
|
||||||
|
public static final String RESET = "<reset>"; // griefus
|
||||||
|
|
||||||
private Color() {
|
private Color() {
|
||||||
throw new IllegalStateException("Utility class");
|
throw new IllegalStateException("Utility class");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue