Add usesundial permission | Fix #1247

This commit is contained in:
Patrikk 2016-07-27 21:17:19 +02:00
parent 69a9b0e29c
commit 111a0a2456
2 changed files with 9 additions and 0 deletions

View file

@ -3514,6 +3514,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;
}

View file

@ -379,6 +379,9 @@ namespace TShockAPI
[Description("Player can place banned tiles.")]
public static readonly string canusebannedtiles = "tshock.tiles.usebanned";
[Description("Player can use the Enchanted Sundial item.")]
public static readonly string usesundial = "tshock.time.usesundial";
/// <summary>
/// Lists all commands associated with a given permission
/// </summary>