Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions LabApi/Events/Arguments/Interfaces/IItemEvent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using LabApi.Features.Wrappers;

namespace LabApi.Events.Arguments.Interfaces;

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions LabApi/Events/Arguments/Interfaces/IPickupEvent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using LabApi.Features.Wrappers;

namespace LabApi.Events.Arguments.Interfaces;

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions LabApi/Events/Arguments/Interfaces/IPlayerEvent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using LabApi.Features.Wrappers;

namespace LabApi.Events.Arguments.Interfaces;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion LabApi/Events/Arguments/Interfaces/IUsableItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace LabApi.Events.Arguments.Interfaces;

/// <summary>
/// Represents an event that involves an usable item.
/// Represents an event that involves a usable item.
/// </summary>
public interface IUsableItem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PlayerAimedWeaponEventArgs : EventArgs, IPlayerEvent, IWeaponEvent
/// </summary>
/// <param name="player">The player who aimed the weapon.</param>
/// <param name="weapon">The weapon that the player aimed.</param>
/// <param name="aiming">Whether or not the player was aiming or unaiming their weapon.</param>
/// <param name="aiming">Whether the player was aiming or unaiming their weapon.</param>
public PlayerAimedWeaponEventArgs(ReferenceHub player, ItemBase weapon, bool aiming)
{
Player = Player.Get(player);
Expand All @@ -30,7 +30,7 @@ public PlayerAimedWeaponEventArgs(ReferenceHub player, ItemBase weapon, bool aim
public Player Player { get; }

/// <summary>
/// Whether or not the player is aiming or unaiming.
/// Whether the player is aiming or unaiming.
/// </summary>
public bool Aiming { get; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using InventorySystem.Items.Usables;
using LabApi.Events.Arguments.Interfaces;
using LabApi.Events.Arguments.Interfaces;
using LabApi.Features.Wrappers;
using System;
using UsableItem = InventorySystem.Items.Usables.UsableItem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using InventorySystem.Items.Usables;
using LabApi.Events.Arguments.Interfaces;
using LabApi.Events.Arguments.Interfaces;
using LabApi.Features.Wrappers;
using System;
using UsableItem = InventorySystem.Items.Usables.UsableItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace LabApi.Events.Arguments.PlayerEvents;

/// <summary>
/// Represents the arguments for the <see cref="Handlers.PlayerEvents.ReceviedEffect"/> event.
/// Represents the arguments for the <see cref="Handlers.PlayerEvents.UpdatedEffect"/> event.
/// </summary>
public class PlayerEffectUpdatedEventArgs : EventArgs, IPlayerEvent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ public class PlayerEscapedEventArgs : EventArgs, IPlayerEvent
/// </summary>
/// <param name="player">The player who escaped.</param>
/// <param name="newRole">The new role.</param>
/// <param name="tokens">The amount of tokens granted to team after escape.</param>
/// <param name="escapeScenarioType">The scenario of the escape.</param>
public PlayerEscapedEventArgs(ReferenceHub player, RoleTypeId newRole, EscapeScenarioType escapeScenarioType)
{
Player = Player.Get(player);
NewRole = newRole;
EscapeScenarioType = escapeScenarioType;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public class PlayerEscapingEventArgs : EventArgs, ICancellableEvent
/// </summary>
/// <param name="player">The player who is escaping.</param>
/// <param name="newRole">The new role that is set after escape.</param>
/// <param name="ticketTeam">The team that will be granted tickets.</param>
/// <param name="tokens">The amount of tokens granted to team after escape.</param>
/// <param name="escapeScenario">The scenario of the escape.</param>
public PlayerEscapingEventArgs(ReferenceHub player, RoleTypeId newRole, EscapeScenarioType escapeScenario)
{
IsAllowed = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public PlayerLeavingPocketDimensionEventArgs(ReferenceHub player, PocketDimensio
public PocketTeleport? Teleport { get; }

/// <summary>
/// Gets whether it is gonna be success.
/// Gets or sets whether it is going to be success.
/// </summary>
public bool IsSuccessful { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class PlayerPickingUpAmmoEventArgs : EventArgs, ICancellableEvent
/// <summary>
/// Initializes a new instance of the <see cref="PlayerPickingUpAmmoEventArgs"/> class.
/// </summary>
/// <param name="player">The player who is pickup the the ammo pickup.</param>
/// <param name="ammoType">Type of the ammo./param>
/// <param name="player">The player who is pickup the ammo pickup.</param>
/// <param name="ammoType">Type of the ammo.</param>
/// <param name="ammoAmount">Amount of ammo that is being picked up.</param>
/// <param name="pickup">Ammo pickup.</param>
public PlayerPickingUpAmmoEventArgs(ReferenceHub player, ItemType ammoType, ushort ammoAmount, ItemPickupBase pickup)
Expand All @@ -27,7 +27,7 @@ public PlayerPickingUpAmmoEventArgs(ReferenceHub player, ItemType ammoType, usho
}

/// <summary>
/// Gets the player who is pickup the the ammo pickup.
/// Gets the player who is picking up the ammo pickup.
/// </summary>
public Player Player { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class PlayerPreAuthenticatedEventArgs : EventArgs
/// <summary>
/// Initializes a new instance of the <see cref="PlayerPreAuthenticatedEventArgs"/> class.
/// </summary>
/// <param name="canJoin">Whenever the player can join.</param>
/// <param name="userId">User ID of the player.</param>
/// <param name="ipAddress">IP Address the of player.</param>
/// <param name="expiration">Expiration of the authentication.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class PlayerPreAuthenticatingEventArgs : EventArgs, ICancellableEvent
/// <summary>
/// Initializes a new instance of the <see cref="PlayerPreAuthenticatingEventArgs"/> class.
/// </summary>
/// <param name="canJoin">Whenever the player can join.</param>
/// <param name="canJoin">Whether the player can join.</param>
/// <param name="userId">User ID of the player.</param>
/// <param name="ipAddress">IP Address the of player.</param>
/// <param name="expiration">Expiration of the authentication.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace LabApi.Events.Arguments.PlayerEvents;
/// <summary>
/// Represents the arguments for the <see cref="Handlers.PlayerEvents.ReportedPlayer"/> event.
/// </summary>
public class PlayerReportedPlayerEventArgs : EventArgs, IPlayerEvent
public class PlayerReportedPlayerEventArgs : EventArgs, IPlayerEvent, ITargetEvent
{
/// <summary>
/// Initializes a new instance of the <see cref="PlayerReportedPlayerEventArgs"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace LabApi.Events.Arguments.PlayerEvents;
/// <summary>
/// Represents the arguments for the <see cref="Handlers.PlayerEvents.ReportingCheater"/> event.
/// </summary>
public class PlayerReportingCheaterEventArgs : EventArgs, IPlayerEvent, ICancellableEvent
public class PlayerReportingCheaterEventArgs : EventArgs, IPlayerEvent, ITargetEvent, ICancellableEvent
{
/// <summary>
/// Initializes a new instance of the <see cref="PlayerReportingCheaterEventArgs"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public PlayerTogglingNoclipEventArgs(ReferenceHub player, bool newState)
public bool NewNoclipState { get; }

/// <summary>
/// Whether the event is allowed to run.<br/>
/// This value is assigned on based on whether the player has noclip permitted. So it may not be allowed by default for some players.
/// Whether the event is allowed to run.
/// </summary>
/// <remarks>This value is assigned on based on whether the player has noclip permitted. So it may not be allowed by default for some players.</remarks>
public bool IsAllowed { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public Scp079BlackingOutZoneEventArgs(ReferenceHub player, FacilityZone zone)
Zone = zone;
IsAllowed = true;
}

/// <summary>
/// The SCP-079 player instance.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public Scp079ChangedCameraEventArgs(ReferenceHub player, Scp079Camera camera)
Player = Player.Get(player);
Camera = camera;
}

/// <summary>
/// The SCP-079 player instance.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public GrenadeExplodedEventArgs(ExplosionGrenade grenade, ReferenceHub player, V

/// <summary>
/// Gets if grenade should destroy doors.
/// </summary>
/// </summary>
public bool ExplodeDoors { get; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public GrenadeExplodingEventArgs(ExplosionGrenade grenade, ReferenceHub player,

/// <summary>
/// Gets or sets if grenade should destroy doors.
/// </summary>
/// </summary>
public bool ExplodeDoors { get; set; } = true;

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ namespace LabApi.Events.Arguments.ServerEvents;
/// </summary>
public class WaveRespawningEventArgs : EventArgs, ICancellableEvent
{
private readonly Dictionary<ReferenceHub, RoleTypeId> _roles;

/// <summary>
/// Initializes a new instance of the <see cref="WaveRespawningEventArgs"/> class.
/// </summary>
Expand All @@ -37,8 +39,6 @@ public WaveRespawningEventArgs(Team team, Dictionary<ReferenceHub, RoleTypeId> r
/// </summary>
public IEnumerable<Player> SpawningPlayers => _roles.Keys.Select(n => Player.Get(n));

private readonly Dictionary<ReferenceHub, RoleTypeId> _roles;

/// <summary>
/// Gets whether is this player spawning.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion LabApi/Features/Console/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static class Logger
/// Logs a debug message to the server console.
/// </summary>
/// <param name="message">The message to log.</param>
/// <param name="canBePrinted">Whether or not the message can be printed.</param>
/// <param name="canBePrinted">Whether the message can be printed.</param>
public static void Debug(object message, bool canBePrinted = true)
{
if (!canBePrinted)
Expand Down
4 changes: 2 additions & 2 deletions LabApi/Features/Interfaces/IScp914ItemProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace LabApi.Features.Interfaces;
public interface IScp914ItemProcessor
{
/// <summary>
/// Whether or not to use the <see cref="UpgradePickup"/> for inventory items and skip using <see cref="UpgradeItem"/>.
/// Whether to use the <see cref="UpgradePickup"/> for inventory items and skip using <see cref="UpgradeItem"/>.
/// </summary>
public bool UsePickupMethodOnly { get; }

Expand All @@ -21,7 +21,7 @@ public interface IScp914ItemProcessor
/// <returns>The upgrade result.</returns>
/// <remarks>
/// This is not called if <see cref="UsePickupMethodOnly"/> is true.
/// Instead items are converted to pickups and <see cref="UpgradePickup"/> is used, and then the pickups are converted back to items.
/// Instead, items are converted to pickups and <see cref="UpgradePickup"/> is used, and then the pickups are converted back to items.
/// </remarks>
public Scp914Result UpgradeItem(Scp914KnobSetting setting, Item item);

Expand Down
2 changes: 1 addition & 1 deletion LabApi/Features/LabApiProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace LabApi.Features;

/// <summary>
/// Contains LabAPI properties which can be accessed by plugins.
///

/// <para>Those properties are a mix of constants and static fields such as <see cref="CompiledVersion"/>.</para>
/// </summary>
public static class LabApiProperties
Expand Down
4 changes: 2 additions & 2 deletions LabApi/Features/Permissions/PermissionsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class PermissionsManager
/// <summary>
/// Internal dictionary to store the registered permission providers.
/// </summary>
private static readonly Dictionary<Type, IPermissionsProvider> PermissionProviders = new ();
private static readonly Dictionary<Type, IPermissionsProvider> PermissionProviders = new();

/// <summary>
/// Registers the given <see cref="IPermissionsProvider"/>.
Expand Down Expand Up @@ -62,7 +62,7 @@ public static class PermissionsManager
return provider;

Logger.Warn($"{LoggerPrefix} The permission provider of type {typeof(T).FullName} is not registered.");
return default;
return null;
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions LabApi/Features/Permissions/Providers/PermissionGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class PermissionGroup
/// <summary>
/// Constructor for deserialization.
/// </summary>
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
public PermissionGroup()
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
{
InheritedGroups = [];
Permissions = [];
}

/// <summary>
Expand Down
Loading