Added a config option for preventing world modification when dead
Closes #437
This commit is contained in:
parent
9648fe1060
commit
2537da2346
2 changed files with 9 additions and 0 deletions
|
|
@ -1649,6 +1649,9 @@ namespace TShockAPI
|
|||
if (tileX < 0 || tileX >= Main.maxTilesX || tileY < 0 || tileY >= Main.maxTilesY)
|
||||
return false;
|
||||
|
||||
if (args.Player.Dead && TShock.Config.PreventDeadModification)
|
||||
return true;
|
||||
|
||||
if (args.Player.AwaitingName)
|
||||
{
|
||||
var protectedregions = TShock.Regions.InAreaRegionName(tileX, tileY);
|
||||
|
|
@ -2221,6 +2224,9 @@ namespace TShockAPI
|
|||
if (tileX < 0 || tileX >= Main.maxTilesX || tileY < 0 || tileY >= Main.maxTilesY)
|
||||
return false;
|
||||
|
||||
if (args.Player.Dead && TShock.Config.PreventDeadModification)
|
||||
return true;
|
||||
|
||||
if (TShock.CheckIgnores(args.Player))
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue