diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs
index f8009983..a73fb0d1 100644
--- a/TShockAPI/ConfigFile.cs
+++ b/TShockAPI/ConfigFile.cs
@@ -233,6 +233,11 @@ namespace TShockAPI
[Description("Prevent players from interacting with the world if dead")] public bool PreventDeadModification =
false;
+ ///
+ /// Reads a configuration file from a given path
+ ///
+ /// string path
+ /// ConfigFile object
public static ConfigFile Read(string path)
{
if (!File.Exists(path))
@@ -243,6 +248,11 @@ namespace TShockAPI
}
}
+ ///
+ /// Reads the configuration file from a stream
+ ///
+ /// stream
+ /// ConfigFile object
public static ConfigFile Read(Stream stream)
{
using (var sr = new StreamReader(stream))
@@ -254,6 +264,10 @@ namespace TShockAPI
}
}
+ ///
+ /// Writes the configuration to a given path
+ ///
+ /// string path - Location to put the config file
public void Write(string path)
{
using (var fs = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Write))
@@ -262,6 +276,10 @@ namespace TShockAPI
}
}
+ ///
+ /// Writes the configuration to a stream
+ ///
+ /// stream
public void Write(Stream stream)
{
var str = JsonConvert.SerializeObject(this, Formatting.Indented);
@@ -271,9 +289,14 @@ namespace TShockAPI
}
}
+ ///
+ /// On config read hook
+ ///
public static Action ConfigRead;
-
+ ///
+ /// Dumps all configuration options to a text file in Markdown format
+ ///
public static void DumpDescriptions()
{
var sb = new StringBuilder();
diff --git a/TShockAPI/Permissions.cs b/TShockAPI/Permissions.cs
index 70e8867a..c64b0489 100644
--- a/TShockAPI/Permissions.cs
+++ b/TShockAPI/Permissions.cs
@@ -180,6 +180,11 @@ namespace TShockAPI
restapi = "api";
}
+ ///
+ /// Lists all commands associated with a given permission
+ ///
+ /// string permission - the permission to get information on
+ /// List of commands
private static List GetCommands(string perm)
{
if (Commands.ChatCommands.Count < 1)
@@ -187,6 +192,9 @@ namespace TShockAPI
return Commands.ChatCommands.Where(c => c.Permission == perm).ToList();
}
+ ///
+ /// Dumps the descriptions of each permission to a file in Markdown format.
+ ///
public static void DumpDescriptions()
{
var sb = new StringBuilder();