[FEAT] MiniMessage formatting support
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import com.hypherionmc.craterlib.nojang.resources.ResourceIdentifier;
|
||||
import me.hypherionmc.mcdiscordformatter.discord.DiscordSerializer;
|
||||
import me.hypherionmc.mcdiscordformatter.minecraft.MinecraftSerializer;
|
||||
@@ -11,11 +9,10 @@
|
||||
@@ -12,11 +10,10 @@
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.Util;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
public class ChatUtils {
|
||||
|
||||
@@ -25,30 +22,20 @@
|
||||
@@ -28,30 +25,20 @@
|
||||
|
||||
public static Component adventureToMojang(net.kyori.adventure.text.Component inComponent) {
|
||||
final String serialised = adventureSerializer.serialize(inComponent);
|
||||
@@ -56,7 +56,7 @@
|
||||
}
|
||||
|
||||
public static String strip(String inString, String... toStrip) {
|
||||
@@ -77,7 +64,7 @@
|
||||
@@ -80,7 +67,7 @@
|
||||
}
|
||||
|
||||
public static net.kyori.adventure.text.Component resolve(String component, boolean formatted) {
|
||||
@@ -65,7 +65,7 @@
|
||||
if (formatted) {
|
||||
returnVal = MinecraftSerializer.INSTANCE.serialize(component);
|
||||
}
|
||||
@@ -105,7 +92,7 @@
|
||||
@@ -108,7 +95,7 @@
|
||||
if (identifier == null)
|
||||
return net.kyori.adventure.text.Component.text("Unknown");
|
||||
|
||||
|
Reference in New Issue
Block a user