code refactoring
This commit is contained in:
parent
cff22c8f18
commit
abd733fd09
2 changed files with 121 additions and 88 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue