File tree Expand file tree Collapse file tree
UncomplicatedCustomItems/Commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using CommandSystem ;
22using Exiled . API . Features ;
3+ using Exiled . Permissions . Extensions ;
34using System ;
45using UncomplicatedCustomItems . API ;
56using UncomplicatedCustomItems . Interfaces ;
@@ -17,6 +18,12 @@ public class List : PlayerCommandBase
1718
1819 public override bool Execute ( ArraySegment < string > arguments , Player player , out string response )
1920 {
21+ if ( ! player . CheckPermission ( "uci.list" ) )
22+ {
23+ response = "Sorry but you don't have the permission to use that command!" ;
24+ return false ;
25+ }
26+
2027 response = "List of every registered custom Items:\n \n Id | Type | Name" ;
2128
2229 foreach ( ICustomItem Item in Manager . Items . Values )
Original file line number Diff line number Diff line change 11using CommandSystem ;
22using Exiled . API . Features ;
3+ using Exiled . Permissions . Extensions ;
34using System ;
45using UncomplicatedCustomItems . API ;
56using UncomplicatedCustomItems . API . Features ;
@@ -17,6 +18,12 @@ public class Summon : PlayerCommandBase
1718
1819 public override bool Execute ( ArraySegment < string > arguments , Player player , out string response )
1920 {
21+ if ( ! player . CheckPermission ( "uci.summon" ) )
22+ {
23+ response = "Sorry but you don't have the permission to use that command!" ;
24+ return false ;
25+ }
26+
2027 if ( arguments . Count < 1 )
2128 {
2229 response = $ "No argument(s) found!\n Syntax: .ucr summon <CustomItem Id> (Player Id)";
Original file line number Diff line number Diff line change 11using CommandSystem ;
22using Exiled . API . Features ;
3+ using Exiled . Permissions . Extensions ;
34using System ;
45using UncomplicatedCustomItems . API ;
56using UncomplicatedCustomItems . API . Features ;
@@ -18,6 +19,12 @@ public class Summoned : PlayerCommandBase
1819
1920 public override bool Execute ( ArraySegment < string > arguments , Player player , out string response )
2021 {
22+ if ( ! player . CheckPermission ( "uci.summoned" ) )
23+ {
24+ response = "Sorry but you don't have the permission to use that command!" ;
25+ return false ;
26+ }
27+
2128 response = "List of every registered custom Items:\n \n Serial | Id | Status | Name | Owner" ;
2229
2330 foreach ( SummonedCustomItem Item in Manager . SummonedItems )
Original file line number Diff line number Diff line change 11using Exiled . API . Features ;
2+ using Exiled . Permissions . Extensions ;
23using System ;
34using UncomplicatedCustomItems . API ;
45using UncomplicatedCustomItems . API . Features ;
@@ -15,6 +16,12 @@ public class Read : PlayerCommandBase
1516
1617 public override bool Execute ( ArraySegment < string > arguments , Player player , out string response )
1718 {
19+ if ( ! player . CheckPermission ( "uci.read" ) )
20+ {
21+ response = "Sorry but you don't have the permission to use that command!" ;
22+ return false ;
23+ }
24+
1825 if ( player . CurrentItem is null || ! Utilities . TryGetSummonedCustomItem ( player . CurrentItem . Serial , out SummonedCustomItem Item ) )
1926 {
2027 response = "You must hold the custom item!" ;
Original file line number Diff line number Diff line change 11using Exiled . API . Features ;
2+ using Exiled . Permissions . Extensions ;
23using System ;
34using UncomplicatedCustomItems . API ;
45using UncomplicatedCustomItems . API . Features ;
@@ -15,6 +16,12 @@ public class Use : PlayerCommandBase
1516
1617 public override bool Execute ( ArraySegment < string > arguments , Player player , out string response )
1718 {
19+ if ( ! player . CheckPermission ( "uci.use" ) )
20+ {
21+ response = "Sorry but you don't have the permission to use that command!" ;
22+ return false ;
23+ }
24+
1825 if ( player . CurrentItem is null || ! Utilities . TryGetSummonedCustomItem ( player . CurrentItem . Serial , out SummonedCustomItem Item ) || Item . CustomItem . CustomItemType != CustomItemType . Item )
1926 {
2027 response = "You must hold the custom item!" ;
You can’t perform that action at this time.
0 commit comments