diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index 498f7c0c1f..3d151789df 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -2907,6 +2907,26 @@ public bool TryAddCandy(CandyKindID candyType) return true; } + /// + /// Removes specific candy from the players . + /// + /// The to remove. + /// Remove all candy of that type. + /// if a candy was removed. + public bool TryRemoveCandу(CandyKindID candyType, bool removeAll = false) + { + foreach (Item item in Items) + { + if (item is not Scp330 bag) + continue; + + if (bag.RemoveCandy(candyType, removeAll) > 0) + return true; + } + + return false; + } + /// /// Resets the player's inventory to the provided list of items, clearing any items it already possess. ///