diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa48e43f..1530cfdf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,7 +20,9 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
* Fixed `CTRL + C` / interactive console interrupt not safely shutting down the server. Now, interrupts will cause a safe shutdown (saving the world and disconnecting all players before fully shutting down). Previously, interrupts caused an unsafe shutdown (not saving the world). (@hakusaro)
* Changed "success message" color to `Color.LimeGreen` instead of `Color.Green`. `Color.Green` looks ugly. `Color.LimeGreen` looks less ugly but isn't as offensively bright as pure green. (@hakusaro)
* Changed the default respawn timer to 10 seconds, so as to not desynchronize from the game by default. (@hakusaro)
-* Fixed `/home` allowing players to bypass the respawn timer. (@hakusaro)
+* Fixed `/home` allowing players to bypass the respawn timer. (@hakusaro, @moisterrific, @Arthri)
+* Added the config option `SuppressPermissionFailureNotices`. When set to `true`, the server will not send warning messages to players when they fail a build permission check from `TSPlayer.HasBuildPermission` (even if `shouldWarnPlayer` is set to true. (@hakusaro)
+
## TShock 4.5.4
* Fixed ridiculous typo in `GetDataHandlers` which caused TShock to read the wrong field in the packet for `usingBiomeTorches`. (@hakusaro, @Arthri)
* Fixed torchgod settings to include whether or not torchgod has been fought by the player before and respect `usingBiomeTorches` setting. (@Quinci135)
diff --git a/TShockAPI/Configuration/TShockConfig.cs b/TShockAPI/Configuration/TShockConfig.cs
index ed78bb53..77f092de 100644
--- a/TShockAPI/Configuration/TShockConfig.cs
+++ b/TShockAPI/Configuration/TShockConfig.cs
@@ -443,6 +443,10 @@ namespace TShockAPI.Configuration
/// Whether or not to kick users when they surpass the TileRectangleSize threshold.
[Description("Whether or not to kick users when they surpass the TileRectangleSize threshold.")]
public bool KickOnTileRectangleSizeThresholdBroken = false;
+
+ /// Whether or not the server should suppress build permission failure warnings from regions, spawn point, or server edit failure.
+ [Description("Whether or not the server should suppress build permission failure warnings from regions, spawn point, or server edit failure.")]
+ public bool SuppressPermissionFailureNotices = false;
#endregion
diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs
index f4b25752..25e61612 100644
--- a/TShockAPI/TSPlayer.cs
+++ b/TShockAPI/TSPlayer.cs
@@ -687,19 +687,21 @@ namespace TShockAPI
}
// If they should be warned, warn them.
- switch (failure)
+ if (!TShock.Config.Settings.SuppressPermissionFailureNotices)
{
- case BuildPermissionFailPoint.GeneralBuild:
- SendErrorMessage("You do not have permission to build on this server.");
- break;
- case BuildPermissionFailPoint.SpawnProtect:
- SendErrorMessage("You do not have permission to build in the spawn point.");
- break;
- case BuildPermissionFailPoint.Regions:
- SendErrorMessage("You do not have permission to build in this region.");
- break;
+ switch (failure)
+ {
+ case BuildPermissionFailPoint.GeneralBuild:
+ SendErrorMessage("You do not have permission to build on this server.");
+ break;
+ case BuildPermissionFailPoint.SpawnProtect:
+ SendErrorMessage("You do not have permission to build in the spawn point.");
+ break;
+ case BuildPermissionFailPoint.Regions:
+ SendErrorMessage("You do not have permission to build in this region.");
+ break;
+ }
}
-
// Set the last warning time to now.
lastPermissionWarning = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;