diff --git a/EXILED/Exiled.API/Features/Npc.cs b/EXILED/Exiled.API/Features/Npc.cs index 6824cbab9..52f339dea 100644 --- a/EXILED/Exiled.API/Features/Npc.cs +++ b/EXILED/Exiled.API/Features/Npc.cs @@ -5,26 +5,22 @@ // // ----------------------------------------------------------------------- -#nullable enable namespace Exiled.API.Features { +#nullable enable using System; using System.Collections.Generic; using System.Linq; using CommandSystem; - using Exiled.API.Enums; using Exiled.API.Extensions; using Exiled.API.Features.Components; + using Exiled.API.Features.Roles; using Footprinting; - using MEC; - using Mirror; - using PlayerRoles; - using UnityEngine; using Object = UnityEngine.Object; @@ -60,8 +56,8 @@ public override Vector3 Position set { base.Position = value; - if (Role is Roles.FpcRole fpcRole) - fpcRole.RelativePosition = new(value); + if (Role is FpcRole fpcRole) + fpcRole.ClientRelativePosition = new(value); } } diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index 314817264..0a2b20b4f 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -2478,6 +2478,15 @@ public void ResetAmmoLimit(AmmoType ammoType) /// If the player has a custom limit for the specific . public bool HasCustomAmmoLimit(AmmoType ammoType) => CustomAmmoLimits.ContainsKey(ammoType); + /// + /// Gets the maximum amount of an the player can hold, based on the armor the player is wearing, as well as server configuration. + /// + /// The to check. + /// The maximum amount of items in the category that the player can hold. + [Obsolete("Use Player::GetCategoryLimit(ItemCategory, bool) instead.")] + public int GetCategoryLimit(ItemCategory category) => + InventorySystem.Configs.InventoryLimits.GetCategoryLimit(category, referenceHub); + /// /// Gets the maximum amount of an the player can hold, based on the armor the player is wearing, as well as server configuration. ///