diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c43bf6d..95984319 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Updated Open Terraria API (OTAPI) and TSAPI for preliminary support of Terraria 1.4.3.0. This functionally changes OTAPI and points to 2.0.0.45 from 2.0.0.43 in previous versions. Developer note: `SendData` takes an extra arg in this version of Terraria but that's slated to be removed in a Terraria hotfix. This is vestigial and OTAPI "hacks that out" to preserve plugin compatibility. That's why it'll differ from the source code. (@Patrikkk, @DeathCradle, honorable mention: @Moneylover3246) * Added Deerclops to `/spawnboss` command. (@hakusaro, @HiddenStriker) * Fixed [GHSA-6w5v-hxr3-m2wx](https://github.com/Pryaxis/TShock/security/advisories/GHSA-6w5v-hxr3-m2wx). (@Yoraiz0r, @Arthri) +* Fixed an issue where player build permissions would reject gem lock changes, even if `RegionProtectGemLocks` was disabled in the config file. Now, players will be permitted to use gem locks if they don't have build permission in a region, but `RegionProtectGemLocks` is disabled. If `RegionProtectGemLocks` is enabled, players will be unable to use gem locks in a build region. (@hakusaro, @Kojirremer, @Arthri) ## TShock 4.5.5 * Changed the world autosave message so that it no longer warns of a "potential lag spike." (@hakusaro) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index a625190b..746904cd 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1922,11 +1922,14 @@ namespace TShockAPI return; } - if (!args.Player.HasBuildPermission(args.X, args.Y)) + if (TShock.Config.Settings.RegionProtectGemLocks) { - TShock.Log.ConsoleDebug("Bouncer / OnGemLockToggle rejected permissions check from {0}", args.Player.Name); - args.Handled = true; - return; + if (!args.Player.HasBuildPermission(args.X, args.Y)) + { + TShock.Log.ConsoleDebug("Bouncer / OnGemLockToggle rejected permissions check from {0}", args.Player.Name); + args.Handled = true; + return; + } } }