code refactoring

This commit is contained in:
unurled 2024-03-18 20:53:18 +01:00
parent cff22c8f18
commit abd733fd09
Signed by: unurled
GPG key ID: FDBC9CBE1F82423F
2 changed files with 121 additions and 88 deletions

View file

@ -1,10 +1,15 @@
package me.unurled.sacredrealms.sr.utils;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.jetbrains.annotations.NotNull;
public class Component {
public static net.kyori.adventure.text.Component comp(String msg) {
public static final String NOT_PLAYER = "<red>You must be a player to use this command.";
private Component() {}
public static net.kyori.adventure.text.@NotNull Component comp(String msg) {
MiniMessage mm = MiniMessage.miniMessage();
return mm.deserialize(msg);
}