mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +00:00
Add configuration option for toggling "fly mode enabled" message on login
This commit is contained in:
parent
3896bcbd64
commit
b17f5d32c9
4 changed files with 12 additions and 1 deletions
|
@ -276,7 +276,9 @@ public class EssentialsPlayerListener implements Listener {
|
|||
if (LocationUtil.shouldFly(user.getLocation())) {
|
||||
user.getBase().setAllowFlight(true);
|
||||
user.getBase().setFlying(true);
|
||||
user.getBase().sendMessage(tl("flyMode", tl("enabled"), user.getDisplayName()));
|
||||
if (ess.getSettings().isSendFlyEnableOnJoin()) {
|
||||
user.getBase().sendMessage(tl("flyMode", tl("enabled"), user.getDisplayName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -235,4 +235,6 @@ public interface ISettings extends IConf {
|
|||
long getLastMessageReplyRecipientTimeout();
|
||||
|
||||
boolean isMilkBucketEasterEggEnabled();
|
||||
|
||||
boolean isSendFlyEnableOnJoin();
|
||||
}
|
||||
|
|
|
@ -1135,4 +1135,8 @@ public class Settings implements net.ess3.api.ISettings {
|
|||
@Override public boolean isMilkBucketEasterEggEnabled() {
|
||||
return config.getBoolean("milk-bucket-easter-egg", true);
|
||||
}
|
||||
|
||||
@Override public boolean isSendFlyEnableOnJoin() {
|
||||
return config.getBoolean("send-fly-enable-on-join", true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -463,6 +463,9 @@ last-message-reply-recipient: true
|
|||
# Toggles whether or not right clicking mobs with a milk bucket turns them into a baby.
|
||||
milk-bucket-easter-egg: true
|
||||
|
||||
# Toggles whether or not the fly status message should be sent to players on join
|
||||
send-fly-enable-on-join: true
|
||||
|
||||
############################################################
|
||||
# +------------------------------------------------------+ #
|
||||
# | EssentialsHome | #
|
||||
|
|
Loading…
Reference in a new issue