Move TShock.CheckIgnores(TSPlayer) -> TSPlayer.CheckIgnores()
Note: This method really sucks and needs to be rebuilt anyway.
This commit is contained in:
parent
9f7c3ead09
commit
1bee289daf
3 changed files with 30 additions and 30 deletions
|
|
@ -1080,7 +1080,7 @@ namespace TShockAPI
|
|||
|
||||
if (Main.ServerSideCharacter && !player.IsLoggedIn)
|
||||
{
|
||||
if (CheckIgnores(player))
|
||||
if (player.CheckIgnores())
|
||||
{
|
||||
player.Disable(flags: flags);
|
||||
}
|
||||
|
|
@ -1160,7 +1160,7 @@ namespace TShockAPI
|
|||
}
|
||||
player.IgnoreActionsForDisabledArmor = check;
|
||||
|
||||
if (CheckIgnores(player))
|
||||
if (player.CheckIgnores())
|
||||
{
|
||||
player.Disable(flags: flags);
|
||||
}
|
||||
|
|
@ -2142,14 +2142,6 @@ namespace TShockAPI
|
|||
return check;
|
||||
}
|
||||
|
||||
/// <summary>CheckIgnores - Checks a players ignores...?</summary>
|
||||
/// <param name="player">player - The TSPlayer object.</param>
|
||||
/// <returns>bool - True if any ignore is not none, false, or login state differs from the required state.</returns>
|
||||
public static bool CheckIgnores(TSPlayer player)
|
||||
{
|
||||
return player.IgnoreActionsForInventory != "none" || player.IgnoreActionsForCheating != "none" || player.IgnoreActionsForDisabledArmor != "none" || player.IgnoreActionsForClearingTrashCan || !player.IsLoggedIn && Config.RequireLogin;
|
||||
}
|
||||
|
||||
/// <summary>OnConfigRead - Fired when the config file has been read.</summary>
|
||||
/// <param name="file">file - The config file object.</param>
|
||||
public void OnConfigRead(ConfigFile file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue