Initial sorting, need to merge in changes from master though

This commit is contained in:
KZ 2020-06-07 13:22:21 -07:00
parent ab1e63beee
commit a27e43f758

View file

@ -30,53 +30,55 @@ namespace TShockAPI
/// <summary>The config file class, which contains the configuration for a server that is serialized into JSON and deserialized on load.</summary>
public class ConfigFile
{
/// <summary>Determines the size of invasion events. The equation for calculating invasion size = 100 + (multiplier * (number of active players > 200 hp)).</summary>
[Description("Determines the size of invasion events.\nThe equation for calculating invasion size is 100 + (multiplier * (number of active players with greater than 200 health)).")]
public int InvasionMultiplier = 1;
/// <summary>The default maximum number of mobs that will spawn per wave. Higher means more mobs in that wave.</summary>
[Description("The default maximum number of mobs that will spawn per wave. Higher means more mobs in that wave.")]
public int DefaultMaximumSpawns = 5;
/// <summary>The delay between waves. Lower values lead to more mobs.</summary>
[Description("The delay between waves. Lower values lead to more mobs.")]
public int DefaultSpawnRate = 600;
// Server
/// <summary>The port the server runs on.</summary>
[Description("The port the server runs on.")]
public int ServerPort = 7777;
/// <summary>Enable or disable the whitelist based on IP addresses in the whitelist.txt file.</summary>
[Description("Enable or disable the whitelist based on IP addresses in the whitelist.txt file.")]
public bool EnableWhitelist;
/// <summary>Enables never-ending invasion events. You still need to start the event.</summary>
[Description("Enables never ending invasion events. You still need to start the event, such as with the /invade command.")]
public bool InfiniteInvasion;
/// <summary>Sets the PvP mode. Valid types are: "normal", "always", "disabled".</summary>
[Description("Sets the PvP mode. Valid types are: \"normal\", \"always\" and \"disabled\".")]
public string PvPMode = "normal";
/// <summary>Prevents tiles from being placed within SpawnProtectionRadius of the default spawn.</summary>
[Description("Prevents tiles from being placed within SpawnProtectionRadius of the default spawn.")]
public bool SpawnProtection = true;
/// <summary>The tile radius around the spawn tile that is protected by the SpawnProtection setting.</summary>
[Description("The tile radius around the spawn tile that is protected by the SpawnProtection setting.")]
public int SpawnProtectionRadius = 10;
/// <summary>Maximum number of clients connected at once. If lower than Terraria's setting, the server will kick excess connections.</summary>
[Description("Maximum number of clients connected at once.\nIf you want people to be kicked with \"Server is full\" set this to how many players you want max and then set Terraria max players to 2 higher.")]
public int MaxSlots = 8;
/// <summary>Enable or disable anti-cheat range checks based on distance between the player and their block placements.</summary>
[Description("Enable or disable anti-cheat range checks based on distance between the player and their block placements.")]
public bool RangeChecks = true;
/// <summary>The number of reserved slots past your max server slots that can be joined by reserved players.</summary>
[Description("The number of reserved slots past your max server slots that can be joined by reserved players.")]
public int ReservedSlots = 20;
/// <summary>Disables any placing, or removal of blocks.</summary>
[Description("Disables any placing, or removal of blocks.")]
public bool DisableBuild;
/// <summary>Replaces the world name during a session if UseServerName is true.</summary>
[Description("Replaces the world name during a session if UseServerName is true.")]
public string ServerName = "";
/// <summary>Whether or not to use ServerName in place of the world name.</summary>
[Description("Whether or not to use ServerName in place of the world name.")]
public bool UseServerName = false;
/// <summary>The server password required to join the server.</summary>
[Description("The server password required to join the server.")]
public string ServerPassword = "";
/// <summary>Prevents users from being able to login before they finish connecting.</summary>
[Description("Prevents users from being able to login before they finish connecting.")]
public bool DisableLoginBeforeJoin;
/// <summary>The path to the directory where logs should be written to.</summary>
[Description("The path to the directory where logs should be written to.")]
public string LogPath = "tshock";
/// <summary>Whether or not the server should output debug level messages related to system operation.</summary>
[Description("Whether or not the server should output debug level messages related to system operation.")]
public bool DebugLogs = true;
// Chat
/// <summary>Disables sending logs as messages to players with the log permission.</summary>
[Description("Disables sending logs as messages to players with the log permission.")]
public bool DisableSpewLogs = true;
/// <summary>Prevents OnSecondUpdate checks from writing to the log file.</summary>
[Description("Prevents OnSecondUpdate checks from writing to the log file.")]
public bool DisableSecondUpdateLogs = false;
/// <summary>The chat color for the superadmin group.</summary>
[Description("The chat color for the superadmin group.\n#.#.# = Red/Blue/Green\nMax value: 255")]
@ -90,6 +92,55 @@ namespace TShockAPI
[Description("The superadmin chat suffix.")]
public string SuperAdminChatSuffix = "";
/// <summary>Whether or not to announce a player's geographic location on join, based on their IP.</summary>
[Description("Whether or not to announce a player's geographic location on join, based on their IP.")]
public bool EnableGeoIP;
/// <summary>Displays a player's IP on join to users with the log permission.</summary>
[Description("Displays a player's IP on join to users with the log permission.")]
public bool DisplayIPToAdmins;
/// <summary>Changes in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.</summary>
[Description("Changes in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.")]
public string ChatFormat = "{1}{2}{3}: {4}";
/// <summary>Changes the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting.\nSame formatting as ChatFormat without the message.</summary>
[Description("Changes the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting.\nSame formatting as ChatFormat without the message.")]
public string ChatAboveHeadsFormat = "{2}";
/// <summary>Whether or not to display chat messages above players' heads.</summary>
[Description("Whether or not to display chat messages above players' heads.")]
public bool EnableChatAboveHeads = false;
/// <summary>The RGB values used for the color of broadcast messages.</summary>
[Description("The RGB values used for the color of broadcast messages.\n#.#.# = Red/Blue/Green\nMax value: 255")]
public int[] BroadcastRGB = { 127, 255, 212 };
/// <summary>Specifies which string starts a command.
/// Note: Will not function properly if the string length is bigger than 1.</summary>
[Description("Specifies which string starts a command.\nNote: Will not function properly if the string length is bigger than 1.")]
public string CommandSpecifier = "/";
/// <summary>Specifies which string starts a command silently.
/// Note: Will not function properly if the string length is bigger than 1.</summary>
[Description("Specifies which string starts a command silently.\nNote: Will not function properly if the string length is bigger than 1.")]
public string CommandSilentSpecifier = ".";
// Backup and Save
/// <summary>Enable or disable Terraria's built-in world auto save.</summary>
[Description("Enable or disable Terraria's built-in world auto save.")]
public bool AutoSave = true;
/// <summary>Enable or disable world save announcements.</summary>
[Description("Enable or disable world save announcements.")]
public bool AnnounceSave = true;
/// <summary>Whether or not to show backup auto save messages.</summary>
[Description("Whether or not to show backup auto save messages.")]
public bool ShowBackupAutosaveMessages = true;
/// <summary>The interval between backups, in minutes. Backups are stored in the tshock/backups folder.</summary>
[Description("The interval between backups, in minutes. Backups are stored in the tshock/backups folder.")]
public int BackupInterval;
@ -98,43 +149,16 @@ namespace TShockAPI
[Description("For how long backups are kept in minutes.\neg. 2880 = 2 days.")]
public int BackupKeepFor = 60;
/// <summary>Remembers where a player left off, based on their IP. Does not persist through server restarts.</summary>
[Description("Remembers where a player left off, based on their IP. Does not persist through server restarts.\neg. When you try to disconnect, and reconnect to be automatically placed at spawn, you'll be at your last location.")]
public bool RememberLeavePos;
/// <summary>Whether or not to save the world if the server crashes from an unhandled exception.</summary>
[Description("Whether or not to save the world if the server crashes from an unhandled exception.")]
public bool SaveWorldOnCrash = true;
/// <summary>Prevents non-hardcore players from connecting.</summary>
[Description("Prevents non-hardcore players from connecting.")]
public bool HardcoreOnly;
/// <summary>Whether or not to save the world when the last player disconnects.</summary>
[Description("Whether or not to save the world when the last player disconnects.")]
public bool SaveWorldOnLastPlayerExit = true;
/// <summary>Prevents softcore players from connecting.</summary>
[Description("Prevents softcore players from connecting.")]
public bool MediumcoreOnly;
/// <summary>Whether or not to kick mediumcore players on death.</summary>
[Description("Whether or not to kick mediumcore players on death.")]
public bool KickOnMediumcoreDeath;
/// <summary>Whether or not to ban mediumcore players on death.</summary>
[Description("Whether or not to ban mediumcore players on death.")]
public bool BanOnMediumcoreDeath;
/// <summary>Enable or disable Terraria's built-in world auto save.</summary>
[Description("Enable or disable Terraria's built-in world auto save.")]
public bool AutoSave = true;
/// <summary>Enable or disable world save announcements.</summary>
[Description("Enable or disable world save announcements.")]
public bool AnnounceSave = true;
/// <summary>Number of failed login attempts before kicking the player.</summary>
[Description("Number of failed login attempts before kicking the player.")]
public int MaximumLoginAttempts = 3;
/// <summary>Replaces the world name during a session if UseServerName is true.</summary>
[Description("Replaces the world name during a session if UseServerName is true.")]
public string ServerName = "";
/// <summary>Whether or not to use ServerName in place of the world name.</summary>
[Description("Whether or not to use ServerName in place of the world name.")]
public bool UseServerName = false;
// MySQL
/// <summary>The type of database to use when storing data (either "sqlite" or "mysql").</summary>
[Description("The type of database to use when storing data (either \"sqlite\" or \"mysql\").")]
@ -147,23 +171,121 @@ namespace TShockAPI
/// <summary>The MySQL hostname and port to direct connections to.</summary>
[Description("The MySQL hostname and port to direct connections to.")]
public string MySqlHost = "localhost:3306";
/// <summary>The database name to connect to when using MySQL as the database type.</summary>
[Description("The database name to connect to when using MySQL as the database type.")]
public string MySqlDbName = "";
/// <summary>The username used when connecting to a MySQL database.</summary>
[Description("The username used when connecting to a MySQL database.")]
public string MySqlUsername = "";
/// <summary>The password used when connecting to a MySQL database.</summary>
[Description("The password used when connecting to a MySQL database.")]
public string MySqlPassword = "";
/// <summary>Whether or not to save logs to the SQL database instead of a text file.</summary>
[Description("Whether or not to save logs to the SQL database instead of a text file.\nDefault = false.")]
public bool UseSqlLogs = false;
/// <summary>Number of times the SQL log must fail to insert logs before falling back to the text log.</summary>
[Description("Number of times the SQL log must fail to insert logs before falling back to the text log.")]
public int RevertToTextLogsOnSqlFailures = 10;
// REST API
/// <summary>Whether or not to require token authentication to use the public REST API endpoints.</summary>
[Description("Whether or not to require token authentication to use the public REST API endpoints.")]
public bool EnableTokenEndpointAuthentication;
/// <summary>Enable or disable the REST API.</summary>
[Description("Enable or disable the REST API.")]
public bool RestApiEnabled;
/// <summary>The port used by the REST API.</summary>
[Description("The port used by the REST API.")]
public int RestApiPort = 7878;
/// <summary>Whether or not to log REST API connections.</summary>
[Description("Whether or not to log REST API connections.")]
public bool LogRest = false;
/// <summary>The maximum REST requests in the bucket before denying requests. Minimum value is 5.</summary>
[Description("The maximum REST requests in the bucket before denying requests. Minimum value is 5.")]
public int RESTMaximumRequestsPerInterval = 5;
/// <summary>How often in minutes the REST requests bucket is decreased by one. Minimum value is 1 minute.</summary>
[Description("How often in minutes the REST requests bucket is decreased by one. Minimum value is 1 minute.")]
public int RESTRequestBucketDecreaseIntervalMinutes = 1;
/// <summary>A dictionary of REST tokens that external applications may use to make queries to your server.</summary>
[Description("A dictionary of REST tokens that external applications may use to make queries to your server.")]
public Dictionary<string, SecureRest.TokenData> ApplicationRestTokens = new Dictionary<string, SecureRest.TokenData>();
// Login and Ban
/// <summary>Number of failed login attempts before kicking the player.</summary>
[Description("Number of failed login attempts before kicking the player.")]
public int MaximumLoginAttempts = 3;
/// <summary>Whether or not to kick mediumcore players on death.</summary>
[Description("Whether or not to kick mediumcore players on death.")]
public bool KickOnMediumcoreDeath;
/// <summary>Whether or not to ban mediumcore players on death.</summary>
[Description("Whether or not to ban mediumcore players on death.")]
public bool BanOnMediumcoreDeath;
/// <summary>Remembers where a player left off, based on their IP. Does not persist through server restarts.</summary>
[Description("Remembers where a player left off, based on their IP. Does not persist through server restarts.\neg. When you try to disconnect, and reconnect to be automatically placed at spawn, you'll be at your last location.")]
public bool RememberLeavePos;
/// <summary>Enable or disable the whitelist based on IP addresses in the whitelist.txt file.</summary>
[Description("Enable or disable the whitelist based on IP addresses in the whitelist.txt file.")]
public bool EnableWhitelist;
/// <summary>The hash algorithm used to encrypt user passwords.
/// Valid types: "sha512", "sha256" and "md5". Append with "-xp" for the xp supported algorithms.</summary>
[Description("The hash algorithm used to encrypt user passwords. Valid types: \"sha512\", \"sha256\" and \"md5\". Append with \"-xp\" for the xp supported algorithms.")]
public string HashAlgorithm = "sha512";
/// <summary>The reason given when kicking players that attempt to join while the server is full.</summary>
[Description("The reason given when kicking players that attempt to join while the server is full.")]
public string ServerFullReason = "Server is full";
/// <summary>The reason given when kicking players for not being on the whitelist.</summary>
[Description("The reason given when kicking players for not being on the whitelist.")]
public string WhitelistKickReason = "You are not on the whitelist.";
/// <summary>The reason given when kicking players that attempt to join while the server is full with no reserved slots available.</summary>
[Description("The reason given when kicking players that attempt to join while the server is full with no reserved slots available.")]
public string ServerFullNoReservedReason = "Server is full. No reserved slots open.";
/// <summary>The reason given if banning a mediumcore player on death.</summary>
[Description("The reason given if banning a mediumcore player on death.")]
public string MediumcoreBanReason = "Death results in a ban";
/// <summary>The reason given if kicking a mediumcore players on death.</summary>
[Description("The reason given if kicking a mediumcore players on death.")]
public string MediumcoreKickReason = "Death results in a kick";
/// <summary>Whether or not to kick hardcore players on death.</summary>
[Description("Whether or not to kick hardcore players on death.")]
public bool KickOnHardcoreDeath;
/// <summary>Whether or not to ban hardcore players on death.</summary>
[Description("Whether or not to ban hardcore players on death.")]
public bool BanOnHardcoreDeath;
/// <summary>The reason given when banning hardcore players on death.</summary>
[Description("The reason given when banning hardcore players on death.")]
public string HardcoreBanReason = "Death results in a ban";
/// <summary>The reason given when kicking hardcore players on death.</summary>
[Description("The reason given when kicking hardcore players on death.")]
public string HardcoreKickReason = "Death results in a kick";
/// <summary>Enables kicking banned users by matching their IP Address.</summary>
[Description("Enables kicking banned users by matching their IP Address.")]
public bool EnableIPBans = true;
@ -184,63 +306,85 @@ namespace TShockAPI
[Description("The default group name to place unregistered players under.")]
public string DefaultGuestGroupName = "guest";
/// <summary>Disables sending logs as messages to players with the log permission.</summary>
[Description("Disables sending logs as messages to players with the log permission.")]
public bool DisableSpewLogs = true;
/// <summary>Prevents OnSecondUpdate checks from writing to the log file.</summary>
[Description("Prevents OnSecondUpdate checks from writing to the log file.")]
public bool DisableSecondUpdateLogs = false;
/// <summary>The hash algorithm used to encrypt user passwords.
/// Valid types: "sha512", "sha256" and "md5". Append with "-xp" for the xp supported algorithms.</summary>
[Description("The hash algorithm used to encrypt user passwords. Valid types: \"sha512\", \"sha256\" and \"md5\". Append with \"-xp\" for the xp supported algorithms.")]
public string HashAlgorithm = "sha512";
/// <summary>The reason given when kicking players that attempt to join while the server is full.</summary>
[Description("The reason given when kicking players that attempt to join while the server is full.")]
public string ServerFullReason = "Server is full";
/// <summary>The reason given when kicking players for not being on the whitelist.</summary>
[Description("The reason given when kicking players for not being on the whitelist.")]
public string WhitelistKickReason = "You are not on the whitelist.";
/// <summary>The reason given when kicking players that attempt to join while the server is full with no reserved slots available.</summary>
[Description("The reason given when kicking players that attempt to join while the server is full with no reserved slots available.")]
public string ServerFullNoReservedReason = "Server is full. No reserved slots open.";
/// <summary>Whether or not to save the world if the server crashes from an unhandled exception.</summary>
[Description("Whether or not to save the world if the server crashes from an unhandled exception.")]
public bool SaveWorldOnCrash = true;
/// <summary>Whether or not to announce a player's geographic location on join, based on their IP.</summary>
[Description("Whether or not to announce a player's geographic location on join, based on their IP.")]
public bool EnableGeoIP;
/// <summary>Whether or not to require token authentication to use the public REST API endpoints.</summary>
[Description("Whether or not to require token authentication to use the public REST API endpoints.")]
public bool EnableTokenEndpointAuthentication;
/// <summary>Enable or disable the REST API.</summary>
[Description("Enable or disable the REST API.")]
public bool RestApiEnabled;
/// <summary>The port used by the REST API.</summary>
[Description("The port used by the REST API.")]
public int RestApiPort = 7878;
/// <summary>Disables tombstone dropping during death for all players.</summary>
[Description("Disables tombstone dropping during death for all players.")]
public bool DisableTombstones = true;
/// <summary>Displays a player's IP on join to users with the log permission.</summary>
[Description("Displays a player's IP on join to users with the log permission.")]
public bool DisplayIPToAdmins;
/// <summary>If GeoIP is enabled, this will kick users identified as being under a proxy.</summary>
[Description("If GeoIP is enabled, this will kick users identified as being under a proxy.")]
public bool KickProxyUsers = true;
/// <summary>Require all players to register or login before being allowed to play.</summary>
[Description("Require all players to register or login before being allowed to play.")]
public bool RequireLogin;
/// <summary>Allows users to register a username that doesn't necessarily match their character name.</summary>
[Description("Allows users to register a username that doesn't necessarily match their character name.")]
public bool AllowRegisterAnyUsername;
/// <summary>Allows users to login to any account even if the username doesn't match their character name.</summary>
[Description("Allows users to login to any account even if the username doesn't match their character name.")]
public bool AllowLoginAnyUsername = true;
/// <summary>Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify.
/// The number of computational rounds is 2^n. Increase with caution. Range: 5-31.</summary>
[Description("Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify. The number of computational rounds is 2^n. Increase with caution. Range: 5-31.")]
public int BCryptWorkFactor = 7;
/// <summary>The minimum password length for new user accounts. Can never be lower than 4.</summary>
[Description("The minimum password length for new user accounts. Can never be lower than 4.")]
public int MinimumPasswordLength = 4;
/// <summary>Prevents users from being able to login with their client UUID.</summary>
[Description("Prevents users from being able to login with their client UUID.")]
public bool DisableUUIDLogin;
/// <summary>Kick clients that don't send their UUID to the server.</summary>
[Description("Kick clients that don't send their UUID to the server.")]
public bool KickEmptyUUID;
// World
/// <summary>Determines the size of invasion events. The equation for calculating invasion size = 100 + (multiplier * (number of active players > 200 hp)).</summary>
[Description("Determines the size of invasion events.\nThe equation for calculating invasion size is 100 + (multiplier * (number of active players with greater than 200 health)).")]
public int InvasionMultiplier = 1;
/// <summary>The default maximum number of mobs that will spawn per wave. Higher means more mobs in that wave.</summary>
[Description("The default maximum number of mobs that will spawn per wave. Higher means more mobs in that wave.")]
public int DefaultMaximumSpawns = 5;
/// <summary>The delay between waves. Lower values lead to more mobs.</summary>
[Description("The delay between waves. Lower values lead to more mobs.")]
public int DefaultSpawnRate = 600;
/// <summary>Enables never-ending invasion events. You still need to start the event.</summary>
[Description("Enables never ending invasion events. You still need to start the event, such as with the /invade command.")]
public bool InfiniteInvasion;
/// <summary>Sets the PvP mode. Valid types are: "normal", "always", "disabled".</summary>
[Description("Sets the PvP mode. Valid types are: \"normal\", \"always\" and \"disabled\".")]
public string PvPMode = "normal";
/// <summary>Prevents tiles from being placed within SpawnProtectionRadius of the default spawn.</summary>
[Description("Prevents tiles from being placed within SpawnProtectionRadius of the default spawn.")]
public bool SpawnProtection = true;
/// <summary>The tile radius around the spawn tile that is protected by the SpawnProtection setting.</summary>
[Description("The tile radius around the spawn tile that is protected by the SpawnProtection setting.")]
public int SpawnProtectionRadius = 10;
/// <summary>Enable or disable anti-cheat range checks based on distance between the player and their block placements.</summary>
[Description("Enable or disable anti-cheat range checks based on distance between the player and their block placements.")]
public bool RangeChecks = true;
/// <summary>Disables any placing, or removal of blocks.</summary>
[Description("Disables any placing, or removal of blocks.")]
public bool DisableBuild;
/// <summary>Prevents non-hardcore players from connecting.</summary>
[Description("Prevents non-hardcore players from connecting.")]
public bool HardcoreOnly;
/// <summary>Prevents softcore players from connecting.</summary>
[Description("Prevents softcore players from connecting.")]
public bool MediumcoreOnly;
/// <summary>If enabled, hardmode will not be activated by the Wall of Flesh or the /starthardmode command.</summary>
[Description("If enabled, hardmode will not be activated by the Wall of Flesh or the /starthardmode command.")]
public bool DisableHardmode;
@ -257,13 +401,9 @@ namespace TShockAPI
[Description("Disables snow ball projectiles from spawning.")]
public bool DisableSnowBalls;
/// <summary>Changes in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.</summary>
[Description("Changes in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.")]
public string ChatFormat = "{1}{2}{3}: {4}";
/// <summary>Changes the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting.\nSame formatting as ChatFormat without the message.</summary>
[Description("Changes the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting.\nSame formatting as ChatFormat without the message.")]
public string ChatAboveHeadsFormat = "{2}";
/// <summary>Disables tombstone dropping during death for all players.</summary>
[Description("Disables tombstone dropping during death for all players.")]
public bool DisableTombstones = true;
/// <summary>Forces the world time to be normal, day, or night.</summary>
[Description("Forces the world time to be normal, day, or night.")]
@ -272,51 +412,27 @@ namespace TShockAPI
/// <summary>Disables a player and reverts their actions if this number of tile kills is exceeded within 1 second.</summary>
[Description("Disables a player and reverts their actions if this number of tile kills is exceeded within 1 second.")]
public int TileKillThreshold = 60;
/// <summary>Whether or not to kick users when they surpass the TileKill threshold.</summary>
[Description("Whether or not to kick users when they surpass the TileKill threshold.")]
public bool KickOnTileKillThresholdBroken = false;
/// <summary>Disables a player and reverts their actions if this number of tile places is exceeded within 1 second.</summary>
[Description("Disables a player and reverts their actions if this number of tile places is exceeded within 1 second.")]
public int TilePlaceThreshold = 32;
/// <summary>Whether or not to kick users when they surpass the TilePlace threshold.</summary>
[Description("Whether or not to kick users when they surpass the TilePlace threshold.")]
public bool KickOnTilePlaceThresholdBroken = false;
/// <summary>Disables a player if this number of liquid sets is exceeded within 1 second.</summary>
[Description("Disables a player if this number of liquid sets is exceeded within 1 second.")]
public int TileLiquidThreshold = 50;
/// <summary>Whether or not to kick users when they surpass the TileLiquid threshold.</summary>
[Description("Whether or not to kick users when they surpass the TileLiquid threshold.")]
public bool KickOnTileLiquidThresholdBroken = false;
/// <summary>Disable a player if this number of projectiles is created within 1 second.</summary>
[Description("Disable a player if this number of projectiles is created within 1 second.")]
public int ProjectileThreshold = 50;
/// <summary>Whether or not to kick users when they surpass the Projectile threshold.</summary>
[Description("Whether or not to kick users when they surpass the Projectile threshold.")]
public bool KickOnProjectileThresholdBroken = false;
/// <summary>Disables a player if this number of HealOtherPlayer packets is sent within 1 second.</summary>
[Description("Disables a player if this number of HealOtherPlayer packets is sent within 1 second.")]
public int HealOtherThreshold = 50;
/// <summary>Whether or not to kick users when they surpass the HealOther threshold.</summary>
[Description("Whether or not to kick users when they surpass the HealOther threshold.")]
public bool KickOnHealOtherThresholdBroken = false;
/// <summary>Whether or not to ignore shrapnel from crystal bullets for the projectile threshold count.</summary>
[Description("Whether or not to ignore shrapnel from crystal bullets for the projectile threshold count.")]
public bool ProjIgnoreShrapnel = true;
/// <summary>Require all players to register or login before being allowed to play.</summary>
[Description("Require all players to register or login before being allowed to play.")]
public bool RequireLogin;
/// <summary>Disables the effect of invisibility potions while PvP is enabled by turning the player visible to the other clients.</summary>
[Description("Disables the effect of invisibility potions while PvP is enabled by turning the player visible to the other clients.")]
public bool DisableInvisPvP;
@ -325,10 +441,6 @@ namespace TShockAPI
[Description("The maximum distance, in tiles, that disabled players can move from.")]
public int MaxRangeForDisabled = 10;
/// <summary>The server password required to join the server.</summary>
[Description("The server password required to join the server.")]
public string ServerPassword = "";
/// <summary>Whether or not region protection should apply to chests.</summary>
[Description("Whether or not region protection should apply to chests.")]
public bool RegionProtectChests;
@ -337,26 +449,6 @@ namespace TShockAPI
[Description("Whether or not region protection should apply to gem locks.")]
public bool RegionProtectGemLocks = true;
/// <summary>Prevents users from being able to login before they finish connecting.</summary>
[Description("Prevents users from being able to login before they finish connecting.")]
public bool DisableLoginBeforeJoin;
/// <summary>Prevents users from being able to login with their client UUID.</summary>
[Description("Prevents users from being able to login with their client UUID.")]
public bool DisableUUIDLogin;
/// <summary>Kick clients that don't send their UUID to the server.</summary>
[Description("Kick clients that don't send their UUID to the server.")]
public bool KickEmptyUUID;
/// <summary>Allows users to register a username that doesn't necessarily match their character name.</summary>
[Description("Allows users to register a username that doesn't necessarily match their character name.")]
public bool AllowRegisterAnyUsername;
/// <summary>Allows users to login to any account even if the username doesn't match their character name.</summary>
[Description("Allows users to login to any account even if the username doesn't match their character name.")]
public bool AllowLoginAnyUsername = true;
/// <summary>The maximum damage a player/NPC can inflict.</summary>
[Description("The maximum damage a player/NPC can inflict.")]
public int MaxDamage = 1175;
@ -413,10 +505,6 @@ namespace TShockAPI
[Description("Prevent players from interacting with the world while they are dead.")]
public bool PreventDeadModification = true;
/// <summary>Whether or not to display chat messages above players' heads.</summary>
[Description("Whether or not to display chat messages above players' heads.")]
public bool EnableChatAboveHeads = false;
/// <summary>Forces Christmas-only events to occur all year.</summary>
[Description("Forces Christmas-only events to occur all year.")]
public bool ForceXmas = false;
@ -429,38 +517,6 @@ namespace TShockAPI
[Description("Allows stacks in chests to go beyond the stack limit during world loading.")]
public bool IgnoreChestStacksOnLoad = false;
/// <summary>The path to the directory where logs should be written to.</summary>
[Description("The path to the directory where logs should be written to.")]
public string LogPath = "tshock";
/// <summary>Whether or not to save logs to the SQL database instead of a text file.</summary>
[Description("Whether or not to save logs to the SQL database instead of a text file.\nDefault = false.")]
public bool UseSqlLogs = false;
/// <summary>Number of times the SQL log must fail to insert logs before falling back to the text log.</summary>
[Description("Number of times the SQL log must fail to insert logs before falling back to the text log.")]
public int RevertToTextLogsOnSqlFailures = 10;
/// <summary>Prevents players from placing tiles with an invalid style.</summary>
[Description("Prevents players from placing tiles with an invalid style.")]
public bool PreventInvalidPlaceStyle = true;
/// <summary>The RGB values used for the color of broadcast messages.</summary>
[Description("The RGB values used for the color of broadcast messages.\n#.#.# = Red/Blue/Green\nMax value: 255")]
public int[] BroadcastRGB = { 127, 255, 212 };
/// <summary>A dictionary of REST tokens that external applications may use to make queries to your server.</summary>
[Description("A dictionary of REST tokens that external applications may use to make queries to your server.")]
public Dictionary<string, SecureRest.TokenData> ApplicationRestTokens = new Dictionary<string, SecureRest.TokenData>();
/// <summary>The number of reserved slots past your max server slots that can be joined by reserved players.</summary>
[Description("The number of reserved slots past your max server slots that can be joined by reserved players.")]
public int ReservedSlots = 20;
/// <summary>Whether or not to log REST API connections.</summary>
[Description("Whether or not to log REST API connections.")]
public bool LogRest = false;
/// <summary>The number of seconds a player must wait before being respawned. Cannot be longer than normal value now. Use at your own risk.</summary>
[Description("The number of seconds a player must wait before being respawned. Cannot be longer than normal value now. Use at your own risk.")]
public int RespawnSeconds = 5;
@ -472,10 +528,6 @@ namespace TShockAPI
/// <summary>Disables a player if this number of tiles is painted within 1 second.</summary>
[Description("Disables a player if this number of tiles is painted within 1 second.")]
public int TilePaintThreshold = 15;
/// <summary>Whether or not to kick users when they surpass the TilePaint threshold.</summary>
[Description("Whether or not to kick users when they surpass the TilePaint threshold.")]
public bool KickOnTilePaintThresholdBroken = false;
/// <summary>Forces Halloween-only events to occur all year.</summary>
[Description("Forces Halloween-only events to occur all year.")]
@ -485,32 +537,6 @@ namespace TShockAPI
[Description("Allows players to break temporary tiles (grass, pots, etc) where they cannot usually build.")]
public bool AllowCutTilesAndBreakables = false;
/// <summary>Specifies which string starts a command.
/// Note: Will not function properly if the string length is bigger than 1.</summary>
[Description("Specifies which string starts a command.\nNote: Will not function properly if the string length is bigger than 1.")]
public string CommandSpecifier = "/";
/// <summary>Specifies which string starts a command silently.
/// Note: Will not function properly if the string length is bigger than 1.</summary>
[Description("Specifies which string starts a command silently.\nNote: Will not function properly if the string length is bigger than 1.")]
public string CommandSilentSpecifier = ".";
/// <summary>Whether or not to kick hardcore players on death.</summary>
[Description("Whether or not to kick hardcore players on death.")]
public bool KickOnHardcoreDeath;
/// <summary>Whether or not to ban hardcore players on death.</summary>
[Description("Whether or not to ban hardcore players on death.")]
public bool BanOnHardcoreDeath;
/// <summary>The reason given when banning hardcore players on death.</summary>
[Description("The reason given when banning hardcore players on death.")]
public string HardcoreBanReason = "Death results in a ban";
/// <summary>The reason given when kicking hardcore players on death.</summary>
[Description("The reason given when kicking hardcore players on death.")]
public string HardcoreKickReason = "Death results in a kick";
/// <summary>Whether or not to announce boss spawning or invasion starts.</summary>
[Description("Whether or not to announce boss spawning or invasion starts.")]
public bool AnonymousBossInvasions = true;
@ -523,37 +549,15 @@ namespace TShockAPI
[Description("The maximum MP a player can have, before equipment buffs.")]
public int MaxMP = 200;
/// <summary>Whether or not to save the world when the last player disconnects.</summary>
[Description("Whether or not to save the world when the last player disconnects.")]
public bool SaveWorldOnLastPlayerExit = true;
/// <summary>Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify.
/// The number of computational rounds is 2^n. Increase with caution. Range: 5-31.</summary>
[Description("Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify. The number of computational rounds is 2^n. Increase with caution. Range: 5-31.")]
public int BCryptWorkFactor = 7;
/// <summary>The minimum password length for new user accounts. Can never be lower than 4.</summary>
[Description("The minimum password length for new user accounts. Can never be lower than 4.")]
public int MinimumPasswordLength = 4;
/// <summary>The maximum REST requests in the bucket before denying requests. Minimum value is 5.</summary>
[Description("The maximum REST requests in the bucket before denying requests. Minimum value is 5.")]
public int RESTMaximumRequestsPerInterval = 5;
/// <summary>How often in minutes the REST requests bucket is decreased by one. Minimum value is 1 minute.</summary>
[Description("How often in minutes the REST requests bucket is decreased by one. Minimum value is 1 minute.")]
public int RESTRequestBucketDecreaseIntervalMinutes = 1;
/// <summary>Whether or not to show backup auto save messages.</summary>
[Description("Whether or not to show backup auto save messages.")]
public bool ShowBackupAutosaveMessages = true;
[Description("Whether or not the server should output debug level messages related to system operation.")]
public bool DebugLogs = true;
/// <summary>Determines the range in tiles that a bomb can affect tiles from detonation point.</summary>
[Description("Determines the range in tiles that a bomb can affect tiles from detonation point.")]
public int BombExplosionRadius = 5;
/// <summary>Prevents players from placing tiles with an invalid style.</summary>
[Description("Prevents players from placing tiles with an invalid style.")]
public bool PreventInvalidPlaceStyle = true;
/// <summary>
/// Reads a configuration file from a given path
/// </summary>