File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace AdminTools.Commands
1414 [ CommandHandler ( typeof ( GameConsoleCommandHandler ) ) ]
1515 public class Jail : ICommand , IUsageProvider
1616 {
17- public string Command { get ; } = "jail" ;
17+ public string Command { get ; } = Main . Instance . Config . JailCommandName ;
1818
1919 public string [ ] Aliases { get ; } = Array . Empty < string > ( ) ;
2020
Original file line number Diff line number Diff line change @@ -22,5 +22,8 @@ public class Config : IConfig
2222
2323 [ Description ( "Whether or not to disable RoundLock & LobbyLock when Waiting For Players" ) ]
2424 public bool DisableLockOnWaiting { get ; set ; } = false ;
25+
26+ [ Description ( "Name of the jail command, useful if you're also using cedmod (or another plugin) that causes conflicts." ) ]
27+ public string JailCommandName { get ; set ; } = "jail" ;
2528 }
2629}
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ public class Main : Plugin<Config>
3434 public override Version Version { get ; } = new ( 7 , 1 , 4 ) ;
3535 public override Version RequiredExiledVersion { get ; } = new ( 8 , 8 , 0 ) ;
3636
37+ public static Main Instance ;
38+
3739 public override void OnEnabled ( )
3840 {
3941 try
@@ -55,6 +57,7 @@ public override void OnEnabled()
5557 Log . Error ( $ "Loading error: { e } ") ;
5658 }
5759
60+ Instance = this ;
5861 EventHandlers = new ( this ) ;
5962
6063 if ( Config . ExtendedCommandUsage )
@@ -70,6 +73,7 @@ public override void OnDisabled()
7073 {
7174 Harmony ? . UnpatchAll ( Harmony . Id ) ;
7275 EventHandlers = null ;
76+ Instance = null ;
7377
7478 base . OnDisabled ( ) ;
7579 }
You can’t perform that action at this time.
0 commit comments