Skip to content

Commit

Permalink
You can now change the report reasons whoooo
Browse files Browse the repository at this point in the history
  • Loading branch information
UserR00T committed May 31, 2018
1 parent 9c67065 commit 94faf7f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/BP-Essentials/EssentialsVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace BP_Essentials
{
public class EssentialsVariablesPlugin : EssentialsCorePlugin
{
public const string Version = "2.4.1";
public const string Version = "2.4.3";

// Generic Constants
public const string FileDirectory = "Essentials/";
Expand Down Expand Up @@ -185,6 +185,7 @@ public class EssentialsVariablesPlugin : EssentialsCorePlugin

public static string[] ReportReasons =
{
// default values
"Random Vote Kick",
"Committing suicide/Disconnecting while arrested",
"Hacks/Exploits/Cheats",
Expand Down
16 changes: 16 additions & 0 deletions source/BP-Essentials/Methods/FileHandler/ReadFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ public class FunctionUI
public string AccessSetStatsMenu { get; set; }
}
[Serializable]
public class ReportOptions
{
public string F2 { get; set; }
public string F3 { get; set; }
public string F4 { get; set; }
public string F5 { get; set; }
public string F6 { get; set; }
public string F7 { get; set; }
public string F8 { get; set; }
public string F9 { get; set; }
public string F10 { get; set; }
}
[Serializable]
public class _Misc
{
public bool enableChatBlock { get; set; }
Expand All @@ -87,6 +100,7 @@ public class __RootObject
public _Messages Messages { get; set; }
public MessageColors MessageColors { get; set; }
public FunctionUI FunctionUI { get; set; }
public ReportOptions ReportOptions { get; set; }
public _Misc Misc { get; set; }
public List<_Command> Commands { get; set; }
}
Expand Down Expand Up @@ -146,6 +160,8 @@ public static void Run(string fileName)
AccessSetStatsMenu = m.FunctionUI.AccessSetStatsMenu;
AccessCWMenu = m.FunctionUI.AccessCWMenu;

ReportReasons = new string[] { m.ReportOptions.F2, m.ReportOptions.F3, m.ReportOptions.F4, m.ReportOptions.F5, m.ReportOptions.F6, m.ReportOptions.F7, m.ReportOptions.F8, m.ReportOptions.F9, m.ReportOptions.F10 };

EnableBlockSpawnBot = m.Misc.EnableBlockSpawnBot;
LanguageBlock = m.Misc.enableLanguageBlock;
ChatBlock = m.Misc.enableChatBlock;
Expand Down

0 comments on commit 94faf7f

Please sign in to comment.