Fixes for PR 2397.

- GroupManager now validates core groups in the constructor.
- EnsureCoreGroupsPresent -> AssertCoreGroupsPresent.
- Fix indentiation in some places.
- Clarify the intent of this PR in CHANGELOG.md.
This commit is contained in:
quake1337 2021-07-31 16:34:43 +02:00
parent c759af6d49
commit 51348d1806
4 changed files with 34 additions and 9 deletions

View file

@ -216,11 +216,12 @@ namespace TShockAPI
/// Asserts that the group reference can be safely assigned to the player object.
/// <para>If this assertion fails, and <paramref name="kick"/> is true, the player is disconnected. If <paramref name="kick"/> is false, the player will receive an error message.</para>
/// </summary>
/// <param name="player"></param>
/// <param name="group"></param>
/// <param name="player">The player in question</param>
/// <param name="group">The group we want to assign them</param>
/// <param name="kick">Whether or not failing this check disconnects the player.</param>
/// <returns></returns>
public bool AssertGroupValid(TSPlayer player, Group group, bool kick)
{
{
if (group == null)
{
if (kick)