1
0

add first join message

This commit is contained in:
Lee
2024-03-28 19:54:03 +00:00
parent 3120240ac5
commit 9622f0ff89
3 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package cc.fascinated.account; package cc.fascinated.account;
import cc.fascinated.Aetheria; import cc.fascinated.Aetheria;
import cc.fascinated.config.Lang;
import cc.fascinated.playercolor.PlayerColor; import cc.fascinated.playercolor.PlayerColor;
import cc.fascinated.utils.Style; import cc.fascinated.utils.Style;
import lombok.Getter; import lombok.Getter;
@ -74,6 +75,8 @@ public class Account {
this.lastLogin = System.currentTimeMillis(); this.lastLogin = System.currentTimeMillis();
this.save(false); // Save default values this.save(false); // Save default values
log.info("Created new account for " + this.uuid); log.info("Created new account for " + this.uuid);
Bukkit.broadcast(Style.getMiniMessage().deserialize(Lang.FIRST_JOIN_MESSAGE.getAsString()));
} }
this.firstJoin = config.getLong("firstJoin"); this.firstJoin = config.getLong("firstJoin");

View File

@ -25,7 +25,8 @@ public enum Lang {
VOTE_COMMAND_LINKS("vote-command.links"), VOTE_COMMAND_LINKS("vote-command.links"),
BLOCKED_MESSAGE("blocked-message"), BLOCKED_MESSAGE("blocked-message"),
BLOCKED_MESSAGE_ALERT("blocked-message-alert"), BLOCKED_MESSAGE_ALERT("blocked-message-alert"),
CHAT_FORMAT("chat-format"); CHAT_FORMAT("chat-format"),
FIRST_JOIN_MESSAGE("first-join-message");
/** /**
* The path of the lang in the lang.yml file. * The path of the lang in the lang.yml file.

View File

@ -5,6 +5,8 @@ chat-format: "<<%chatcolor%>%name%</%chatcolor%>> <hover:show_text:Click to mess
blocked-message: "<prefix><hover:show_text:%reason%><red>Your message has been blocked." blocked-message: "<prefix><hover:show_text:%reason%><red>Your message has been blocked."
blocked-message-alert: "<admin-prefix><red>%player% <grey>tried to send a blocked message: <white>%message%" blocked-message-alert: "<admin-prefix><red>%player% <grey>tried to send a blocked message: <white>%message%"
first-join-message: "<yellow>%player% <white>joined for the first time!"
help-command: help-command:
- "<prefix>Commands:" - "<prefix>Commands:"
- "<yellow>/kill <gray>- <white>Kills you" - "<yellow>/kill <gray>- <white>Kills you"