Added spawn protection. Prevents any tile from being placed/killed within a 5 block radius.
/protectspawn - Toggle spawn protection.
This commit is contained in:
parent
474498416d
commit
48ea956724
4 changed files with 58 additions and 4 deletions
|
|
@ -29,6 +29,7 @@ namespace TShockAPI
|
|||
public static bool kickTnt = false;
|
||||
public static bool banBoom = true;
|
||||
public static bool kickBoom = true;
|
||||
public static bool spawnProtect = true;
|
||||
|
||||
public enum NPCList : int
|
||||
{
|
||||
|
|
@ -58,6 +59,7 @@ namespace TShockAPI
|
|||
kickTnt = cfg.KickKillTileAbusers;
|
||||
banBoom = cfg.BanExplosives;
|
||||
kickBoom = cfg.KickExplosives;
|
||||
spawnProtect = cfg.SpawnProtection;
|
||||
}
|
||||
|
||||
public static void WriteJsonConfiguration()
|
||||
|
|
@ -87,6 +89,7 @@ namespace TShockAPI
|
|||
cfg.KickKillTileAbusers = true;
|
||||
cfg.BanExplosives = true;
|
||||
cfg.KickExplosives = true;
|
||||
cfg.SpawnProtection = true;
|
||||
|
||||
string json = JsonConvert.SerializeObject(cfg, Formatting.Indented);
|
||||
TextWriter tr = new StreamWriter(FileTools.SaveDir + "config.json");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue