mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-25 07:59:44 +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())) {
|
if (LocationUtil.shouldFly(user.getLocation())) {
|
||||||
user.getBase().setAllowFlight(true);
|
user.getBase().setAllowFlight(true);
|
||||||
user.getBase().setFlying(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();
|
long getLastMessageReplyRecipientTimeout();
|
||||||
|
|
||||||
boolean isMilkBucketEasterEggEnabled();
|
boolean isMilkBucketEasterEggEnabled();
|
||||||
|
|
||||||
|
boolean isSendFlyEnableOnJoin();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1135,4 +1135,8 @@ public class Settings implements net.ess3.api.ISettings {
|
||||||
@Override public boolean isMilkBucketEasterEggEnabled() {
|
@Override public boolean isMilkBucketEasterEggEnabled() {
|
||||||
return config.getBoolean("milk-bucket-easter-egg", true);
|
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.
|
# Toggles whether or not right clicking mobs with a milk bucket turns them into a baby.
|
||||||
milk-bucket-easter-egg: true
|
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 | #
|
# | EssentialsHome | #
|
||||||
|
|
Loading…
Reference in a new issue