Finished inventory permissions.
This commit is contained in:
parent
1d1611407a
commit
86005acdcc
2 changed files with 12 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue