55using System . Threading . Tasks ;
66using Sandbox . Game . Entities ;
77using Torch . Commands ;
8+ using Torch . Commands . Permissions ;
89using VRage . Game . ModAPI ;
910
1011namespace Essentials
@@ -13,6 +14,7 @@ namespace Essentials
1314 public class DeleteModule : CommandModule
1415 {
1516 [ Command ( "grids nosubtype" , "Delete all grids that don't have a block of the given subtype." ) ]
17+ [ Permission ( MyPromoteLevel . SpaceMaster ) ]
1618 public void DeleteBySubtype ( string subtype )
1719 {
1820 var count = 0 ;
@@ -41,6 +43,7 @@ bool ShouldRemove(MyCubeGrid grid)
4143 }
4244
4345 [ Command ( "grids ownedby" , "Delete grids that the given player owns the majority of." ) ]
46+ [ Permission ( MyPromoteLevel . SpaceMaster ) ]
4447 public void DeleteByOwner ( string name )
4548 {
4649 var player = Utilities . GetPlayerByNameOrId ( name ) ;
@@ -64,6 +67,7 @@ public void DeleteByOwner(string name)
6467 }
6568
6669 [ Command ( "grids blockslessthan" , "Delete grids with fewer than X blocks." ) ]
70+ [ Permission ( MyPromoteLevel . SpaceMaster ) ]
6771 public void DeleteBlocksLessThan ( int minBlocks )
6872 {
6973 var count = 0 ;
@@ -79,6 +83,8 @@ public void DeleteBlocksLessThan(int minBlocks)
7983 Context . Respond ( $ "Deleted { count } grids with less than { minBlocks } blocks.") ;
8084 }
8185
86+ [ Command ( "grids blocksgreaterthan" , "Delete grids with greater than X blocks." ) ]
87+ [ Permission ( MyPromoteLevel . SpaceMaster ) ]
8288 public void DeleteBlocksGreaterThan ( int maxBlocks )
8389 {
8490 var count = 0 ;
@@ -95,6 +101,7 @@ public void DeleteBlocksGreaterThan(int maxBlocks)
95101 }
96102
97103 [ Command ( "floating" , "Delete all floating objects." ) ]
104+ [ Permission ( MyPromoteLevel . SpaceMaster ) ]
98105 public void DeleteFloating ( )
99106 {
100107 var count = 0 ;
0 commit comments