Finished inventory permissions.

This commit is contained in:
Zidonuke 2011-12-28 21:25:55 -05:00
parent 1d1611407a
commit 86005acdcc
2 changed files with 12 additions and 1 deletions

View file

@ -348,13 +348,21 @@ namespace TShockAPI
if (TShock.Config.ServerSideInventory)
{
if (!TShock.CheckInventory(args.Player))
if (args.Player.Group.HasPermission(Permissions.bypassinventorychecks))
{
args.Player.IgnoreActionsForInventory = false;
args.Player.IgnoreActionsForClearingTrashCan = false;
}
else if (!TShock.CheckInventory(args.Player))
{
args.Player.SendMessage("Login Failed, Please fix the above errors then /login again.", Color.Cyan);
args.Player.IgnoreActionsForClearingTrashCan = true;
return;
}
}
if (args.Player.Group.HasPermission(Permissions.ignorestackhackdetection))
args.Player.IgnoreActionsForCheating = "none";
args.Player.Group = TShock.Utils.GetGroup(user.Group);
args.Player.UserAccountName = args.Parameters[0];

View file

@ -175,6 +175,9 @@ namespace TShockAPI
[Description("User can see who plays on server")]
public static readonly string candisplayplaying;
[Description("Bypass Server Side Inventory checks")]
public static readonly string bypassinventorychecks;
static Permissions()