diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 963a7858..c7a12ec7 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -3515,6 +3515,12 @@ namespace TShockAPI return true; } + if (type == 3 & !args.Player.HasPermission(Permissions.usesundial)) + { + args.Player.SendErrorMessage("You do not have permission to use the Enchanted Sundial!"); + return true; + } + return false; } diff --git a/TShockAPI/Permissions.cs b/TShockAPI/Permissions.cs index 15123a81..855e989e 100644 --- a/TShockAPI/Permissions.cs +++ b/TShockAPI/Permissions.cs @@ -275,6 +275,9 @@ namespace TShockAPI [Description("User can set the time.")] public static readonly string time = "tshock.world.time.set"; + [Description("Player can use the Enchanted Sundial item.")] + public static readonly string usesundial = "tshock.world.time.usesundial"; + [Description("User can grow plants.")] public static readonly string grow = "tshock.world.grow"; @@ -329,6 +332,9 @@ namespace TShockAPI [Description("User can modify the wind.")] public static readonly string wind = "tshock.world.wind"; + [Description("Player can toggle party event.")] + public static readonly string toggleparty = "tshock.world.toggleparty"; + // Non-grouped [Description("User can clear items or projectiles.")] @@ -378,10 +384,6 @@ namespace TShockAPI [Description("Player can place banned tiles.")] public static readonly string canusebannedtiles = "tshock.tiles.usebanned"; - - [Description("Player can toggle party event.")] - public static readonly string toggleparty = "tshock.world.toggleparty"; - /// /// Lists all commands associated with a given permission ///