diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index e93350313..b597d21e4 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -237,4 +237,6 @@ public interface ISettings extends IConf { boolean isMilkBucketEasterEggEnabled(); boolean isSendFlyEnableOnJoin(); + + boolean isWorldTimePermissions(); } diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 8c604c681..b9e8b2d9e 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -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); + } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtime.java b/Essentials/src/com/earth2me/essentials/commands/Commandtime.java index 36f1e2694..a97f5551a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtime.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtime.java @@ -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) { diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index cbb447773..6a93aa35e 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -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.. +world-time-permissions: false + ############################################################ # +------------------------------------------------------+ # # | EssentialsHome | #