Skip to content

Commit d6556d7

Browse files
add IsEnabled config option
1 parent 5c019ba commit d6556d7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Code/Plugin/Config.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
public class Config
44
{
5+
public bool IsEnabled { get; set; } = true;
6+
57
public bool SerMethodsAsCommands { get; set; } = false;
68

79
public bool SendHelpMessageOnServerInitialization { get; set; } = true;

Code/Plugin/MainPlugin.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@ public enum Contribution
5959

6060
public override void Enable()
6161
{
62+
if (Config?.IsEnabled is false)
63+
{
64+
Logger.Info("Scripted Events Reloaded is disabled via config.");
65+
return;
66+
}
67+
6268
Instance = this;
63-
69+
6470
Script.StopAll();
6571
EventHandler.Initialize();
6672
MethodIndex.Initialize();

0 commit comments

Comments
 (0)