mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-27 01:40:48 +08:00
Add world-time-permissions configurable variable (false by default) that justifies whether /time should check for per world permissions. This was recommended by Khobbits as newbies might get confused by this feature.
This commit is contained in:
parent
d895d40fbf
commit
c6d2746959
@ -237,4 +237,6 @@ public interface ISettings extends IConf {
|
||||
boolean isMilkBucketEasterEggEnabled();
|
||||
|
||||
boolean isSendFlyEnableOnJoin();
|
||||
|
||||
boolean isWorldTimePermissions();
|
||||
}
|
||||
|
@ -1139,4 +1139,9 @@ public class Settings implements net.ess3.api.ISettings {
|
||||
@Override public boolean isSendFlyEnableOnJoin() {
|
||||
return config.getBoolean("send-fly-enable-on-join", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWorldTimePermissions() {
|
||||
return config.getBoolean("world-time-permissions", false);
|
||||
}
|
||||
}
|
||||
|
@ -165,7 +165,8 @@ public class Commandtime extends EssentialsCommand {
|
||||
}
|
||||
|
||||
private boolean canUpdateAll(User user) {
|
||||
return user == null || user.isAuthorized("essentials.time.world.all");
|
||||
return !ess.getSettings().isWorldTimePermissions() // First check if per world permissions are enabled, if not, return true.
|
||||
|| user == null || user.isAuthorized("essentials.time.world.all");
|
||||
}
|
||||
|
||||
private boolean canUpdateWorld(User user, World world) {
|
||||
|
@ -466,6 +466,11 @@ 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
|
||||
|
||||
# Set to true to enable per-world permissions for setting time for individual worlds with essentials commands.
|
||||
# This applies to /time, /day, /eday, /night, /enight, /etime.
|
||||
# Give someone permission to teleport to a world with essentials.time.world.<worldname>.
|
||||
world-time-permissions: false
|
||||
|
||||
############################################################
|
||||
# +------------------------------------------------------+ #
|
||||
# | EssentialsHome | #
|
||||
|
Loading…
Reference in New Issue
Block a user