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,7 +348,12 @@ 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;
@ -356,6 +361,9 @@ namespace TShockAPI
}
}
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];
args.Player.UserID = TShock.Users.GetUserID(args.Player.UserAccountName);

View file

@ -176,6 +176,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()
{