diff --git a/Exiled.API/Features/Player.cs b/Exiled.API/Features/Player.cs index 52011ca13e..ddc42cd1dd 100644 --- a/Exiled.API/Features/Player.cs +++ b/Exiled.API/Features/Player.cs @@ -2587,11 +2587,36 @@ public void ResetInventory(IEnumerable newItems) /// /// public void ClearInventory(bool destroy = true) + { + ClearItems(destroy); + ClearAmmo(); + } + + /// + /// Clears the player's items. + /// + /// Whether or not to fully destroy the old items. + /// + /// + /// + public void ClearItems(bool destroy = true) { while (Items.Count > 0) RemoveItem(Items.ElementAt(0), destroy); } + /// + /// Clears all ammo in the inventory. + /// + /// + /// + /// + public void ClearAmmo() + { + ReferenceHub.inventory.UserInventory.ReserveAmmo.Clear(); + ReferenceHub.inventory.SendAmmoNextFrame = true; + } + /// /// Drops all items in the player's inventory, including all ammo and items. ///