1
0

mini message!! woop!!

This commit is contained in:
Lee
2024-03-28 18:13:15 +00:00
parent 2ea78e5462
commit adeaeb13c0
13 changed files with 161 additions and 28 deletions

View File

@ -2,10 +2,12 @@ package cc.fascinated.account;
import cc.fascinated.Aetheria;
import cc.fascinated.playercolor.PlayerColor;
import cc.fascinated.utils.Style;
import lombok.Getter;
import lombok.SneakyThrows;
import lombok.extern.log4j.Log4j2;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
@ -48,7 +50,7 @@ public class Account {
private final PlayerColor playerColorProfile;
public Account(UUID uuid) {
log.info("Loading account for " + uuid);
//log.info("Loading account for " + uuid);
boolean newAccount = false;
this.uuid = uuid;
@ -61,6 +63,7 @@ public class Account {
try {
file.createNewFile();
} catch (Exception e) {
log.warn("Failed to create account file for " + this.uuid);
e.printStackTrace();
}
}
@ -81,7 +84,7 @@ public class Account {
// Load profiles
this.playerColorProfile = new PlayerColor(this, this.getProfileSection("playerColor"));
log.info("Loaded account for " + this.uuid);
//log.info("Loaded account for " + this.uuid);
}
/**
@ -117,7 +120,7 @@ public class Account {
* @param message the message to send
*/
public void sendMessage(String message) {
this.sendMessage(Component.text(message));
this.sendMessage(Style.getMiniMessage().deserialize(message));
}
/**