Don't kick a player if they destroy a chest that is client side only due to hitting the max number of chests.
This commit is contained in:
parent
9b2409c9b5
commit
e6d612ea4b
2 changed files with 15 additions and 1 deletions
|
|
@ -519,5 +519,19 @@ namespace TShockAPI
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if world has hit the max number of chests
|
||||
/// </summary>
|
||||
/// <returns>True if the entire chest array is used</returns>
|
||||
public static bool MaxChests()
|
||||
{
|
||||
for (int i = 0; i < Main.chest.Length; i++)
|
||||
{
|
||||
if (Main.chest[i] == null)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue