Actually, let's make it possible to disable it if needed

This commit is contained in:
Video 2021-08-10 04:13:23 -06:00
parent a9c9979b1c
commit 871acc2eeb
3 changed files with 8 additions and 5 deletions

View File

@ -192,7 +192,7 @@ public class LoginProcess extends FreedomService
final PlayerData playerData = plugin.pl.getData(player); final PlayerData playerData = plugin.pl.getData(player);
// Sends a message to the player if they have never joined before (or simply lack player data). // Sends a message to the player if they have never joined before (or simply lack player data).
if (!event.getPlayer().hasPlayedBefore()) if (!event.getPlayer().hasPlayedBefore() && ConfigEntry.FIRST_JOIN_INFO_ENABLED.getBoolean())
{ {
final BukkitTask runnable = new BukkitRunnable() final BukkitTask runnable = new BukkitRunnable()
{ {

View File

@ -165,7 +165,8 @@ public enum ConfigEntry
ADMIN_INFO(List.class, "admininfo"), ADMIN_INFO(List.class, "admininfo"),
VOTING_INFO(List.class, "votinginfo"), VOTING_INFO(List.class, "votinginfo"),
MASTER_BUILDER_INFO(List.class, "masterbuilderinfo"), MASTER_BUILDER_INFO(List.class, "masterbuilderinfo"),
FIRST_JOIN_INFO(List.class, "first_join_info"), FIRST_JOIN_INFO(List.class, "first_join_info.text"),
FIRST_JOIN_INFO_ENABLED(Boolean.class, "first_join_info.enabled"),
AUTO_ENTITY_WIPE(Boolean.class, "auto_wipe"), AUTO_ENTITY_WIPE(Boolean.class, "auto_wipe"),
TOGGLE_CHAT(Boolean.class, "toggle_chat"), TOGGLE_CHAT(Boolean.class, "toggle_chat"),
DEVELOPER_MODE(Boolean.class, "developer_mode"), DEVELOPER_MODE(Boolean.class, "developer_mode"),

View File

@ -592,6 +592,8 @@ masterbuilderinfo:
# What new players will see upon joining for the first time. # What new players will see upon joining for the first time.
first_join_info: first_join_info:
enabled: true
text:
- "&6Welcome to TotalFreedom -- the original Free-OP server!" - "&6Welcome to TotalFreedom -- the original Free-OP server!"
- "&eThe server's name doesn't mean we have no rules. Do &6/rules &efor a list of them." - "&eThe server's name doesn't mean we have no rules. Do &6/rules &efor a list of them."
- "&aNeed help getting started? Do &2/help &aor a list of commands!" - "&aNeed help getting started? Do &2/help &aor a list of commands!"