Write proper docs

This commit is contained in:
Ruby Rose 2017-06-08 17:18:38 +03:00 committed by GitHub
parent 7e08b9a8d0
commit 8ae0a3b5a6

View file

@ -1254,19 +1254,33 @@ namespace TShockAPI
return Group.HasPermission(permission);
}
/// <inheritdoc cref="HasPermission(string)"/>
/// <summary>
/// Checks to see if a player has permission to use the specific banned item.
/// Fires the <see cref="PlayerHooks.OnPlayerItembanPermission"/> hook which may be handled to override item ban permission checks.
/// </summary>
/// <param name="bannedItem">The <see cref="ItemBan" /> to check.</param>
/// <returns>True if the player has permission to use the banned item.</returns>
public bool HasPermission(ItemBan bannedItem)
{
return TShock.Itembans.ItemIsBanned(bannedItem.Name, this);
}
/// <inheritdoc cref="HasPermission(string)"/>
/// <summary>
/// Checks to see if a player has permission to use the specific banned projectile.
/// Fires the <see cref="PlayerHooks.OnPlayerProjbanPermission"/> hook which may be handled to override projectile ban permission checks.
/// </summary>
/// <param name="bannedProj">The <see cref="ProjectileBan" /> to check.</param>
/// <returns>True if the player has permission to use the banned projectile.</returns>
public bool HasPermission(ProjectileBan bannedProj)
{
return TShock.ProjectileBans.ProjectileIsBanned(bannedProj.ID, this);
}
/// <inheritdoc cref="HasPermission(string)"/>
/// <summary>
/// Checks to see if a player has permission to use the specific banned tile.
/// Fires the <see cref="PlayerHooks.OnPlayerTilebanPermission"/> hook which may be handled to override tile ban permission checks.
/// </summary>
/// <param name="bannedTile">The <see cref="TileBan" /> to check.</param>
/// <returns>True if the player has permission to use the banned tile.</returns>
public bool HasPermission(TileBan bannedTile)
{
return TShock.TileBans.TileIsBanned(bannedTile.ID, this);