diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 38b06a81..b352e6f5 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -138,7 +138,7 @@ namespace TShockAPI item.netDefaults(type); item.Prefix(prefix); - if (stack > item.maxStack && type != 0 && args.Player.IgnoreActionsForCheating != "none") + if (stack > item.maxStack && type != 0 && args.Player.IgnoreActionsForCheating != "none" && !args.Player.Group.HasPermission(Permissions.ignorestackhackdetection)) { args.Player.IgnoreActionsForCheating = "Item Hack: " + item.name + " (" + stack + ") exceeds max stack of " + item.maxStack; } @@ -331,11 +331,16 @@ namespace TShockAPI return true; args.Player.RequestedSection = true; - if (TShock.HackedHealth(args.Player)) + if (TShock.HackedHealth(args.Player) && !args.Player.Group.HasPermission(Permissions.ignorestathackdetection)) { TShock.Utils.ForceKick(args.Player, "You have Hacked Health/Mana, Please use a different character."); } + if (!args.Player.Group.HasPermission(Permissions.ignorestackhackdetection)) + { + TShock.HackedInventory(args.Player); + } + if (TShock.Utils.ActivePlayers() + 1 > TShock.Config.MaxSlots && !args.Player.Group.HasPermission(Permissions.reservedslot)) { TShock.Utils.ForceKick(args.Player, TShock.Config.ServerFullReason); diff --git a/TShockAPI/Permissions.cs b/TShockAPI/Permissions.cs index 0b2f071b..6d2f4c47 100644 --- a/TShockAPI/Permissions.cs +++ b/TShockAPI/Permissions.cs @@ -47,6 +47,12 @@ namespace TShockAPI [Description("Prevents you from being reverted by no clip detection")] public static readonly string ignorenoclipdetection; + [Description("Prevents you from being disabled by stack hack detection")] + public static readonly string ignorestackhackdetection; + + [Description("Prevents you from being kicked by hacked health detection")] + public static readonly string ignorestathackdetection; + [Description("Specific log messages are sent to users with this permission")] public static readonly string logs; diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 967834f0..fdf0ff8a 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -801,6 +801,23 @@ namespace TShockAPI player.SendMessage("PvP is forced! Enable PvP else you can't move or do anything!", Color.Red); } + if (!player.IsLoggedIn) + { + if (Config.RequireLogin) + { + player.SendMessage("Please /register or /login to play!", Color.Red); + } + else if (Config.ServerSideInventory) + { + player.SendMessage("Server Side Inventory is enabled! Please /register or /login to play!", Color.Red); + } + + if (Config.ServerSideInventory) + { + player.IgnoreActionsForInventory = true; + } + } + if (player.Group.HasPermission(Permissions.causeevents) && Config.InfiniteInvasion) { StartInvasion();