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:
parent
c759af6d49
commit
51348d1806
4 changed files with 34 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue