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:
Deathmax 2011-07-14 22:37:29 +08:00
parent 9b2409c9b5
commit e6d612ea4b
2 changed files with 15 additions and 1 deletions

View file

@ -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;
}
}
}