mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Merge branch 'development' into FS-381
This commit is contained in:
commit
3be0ffba4e
@ -19,6 +19,7 @@ import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerLoginEvent;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
public class LoginProcess extends FreedomService
|
||||
{
|
||||
@ -190,6 +191,22 @@ public class LoginProcess extends FreedomService
|
||||
final FPlayer fPlayer = plugin.pl.getPlayer(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).
|
||||
if (!event.getPlayer().hasPlayedBefore() && ConfigEntry.FIRST_JOIN_INFO_ENABLED.getBoolean())
|
||||
{
|
||||
new BukkitRunnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
for (String line : ConfigEntry.FIRST_JOIN_INFO.getStringList())
|
||||
{
|
||||
player.sendMessage(FUtil.colorize(line));
|
||||
}
|
||||
}
|
||||
}.runTaskLater(plugin, 20);
|
||||
}
|
||||
|
||||
player.sendTitle(FUtil.colorize(ConfigEntry.SERVER_LOGIN_TITLE.getString()), FUtil.colorize(ConfigEntry.SERVER_LOGIN_SUBTITLE.getString()), 20, 100, 60);
|
||||
player.setOp(true);
|
||||
|
||||
|
@ -165,6 +165,8 @@ public enum ConfigEntry
|
||||
ADMIN_INFO(List.class, "admininfo"),
|
||||
VOTING_INFO(List.class, "votinginfo"),
|
||||
MASTER_BUILDER_INFO(List.class, "masterbuilderinfo"),
|
||||
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"),
|
||||
TOGGLE_CHAT(Boolean.class, "toggle_chat"),
|
||||
DEVELOPER_MODE(Boolean.class, "developer_mode"),
|
||||
|
@ -590,6 +590,14 @@ masterbuilderinfo:
|
||||
- ' &2- Template:'
|
||||
- '&9https://forum.totalfreedom.me/d/336-master-builder-application-process'
|
||||
|
||||
# What new players will see upon joining for the first time.
|
||||
first_join_info:
|
||||
enabled: true
|
||||
text:
|
||||
- "&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."
|
||||
- "&aNeed help getting started? Do &2/help &aor a list of commands!"
|
||||
|
||||
# Famous players - cannot be banned by username
|
||||
famous_players:
|
||||
- honeydew
|
||||
|
Loading…
Reference in New Issue
Block a user