diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs index c51fd1665b..4a953744f2 100644 --- a/EXILED/Exiled.API/Features/Map.cs +++ b/EXILED/Exiled.API/Features/Map.cs @@ -13,6 +13,8 @@ namespace Exiled.API.Features using System.Collections.ObjectModel; using System.Linq; + using CommandSystem.Commands.RemoteAdmin.Cleanup; + using Decals; using Enums; using Exiled.API.Extensions; using Exiled.API.Features.Hazards; @@ -27,6 +29,7 @@ namespace Exiled.API.Features using PlayerRoles.Ragdolls; using UnityEngine; using Utils; + using Utils.Networking; using Object = UnityEngine.Object; @@ -271,6 +274,19 @@ public static void CleanAllRagdolls(IEnumerable ragDolls) ragDoll.Destroy(); } + /// + /// Destroy specified amount of specified object. + /// + /// Decal type to destroy. + /// Amount of decals to destroy. + public static void Clean(DecalPoolType decalType, int amount) => new DecalCleanupMessage(decalType, amount).SendToAuthenticated(); + + /// + /// Destroy all specified objects. + /// + /// Decal type to destroy. + public static void Clean(DecalPoolType decalType) => Clean(decalType, int.MaxValue); + /// /// Places a blood decal. ///