Spawn protection. 5 block radius.

/protectspawn - toggle spawn protection.
This commit is contained in:
Deathmax 2011-06-04 14:21:41 +08:00
parent 474498416d
commit 069c95e2cf
4 changed files with 58 additions and 4 deletions

View file

@ -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");