summaryrefslogtreecommitdiff
path: root/pvp.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-11-02 16:54:19 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2016-11-02 16:54:19 +0000
commit9c5fd8b6ef477ffdba195a971514f3230e30ef29 (patch)
tree7d088a2c88c78a99f3393ddcb883e6a116672300 /pvp.lua
parentfdbb2415182b699786b686c59e97f8dce34d97a5 (diff)
tidy code, add protected spawn feature
Diffstat (limited to 'pvp.lua')
-rw-r--r--pvp.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/pvp.lua b/pvp.lua
index 5a6cc8b..6cc5407 100644
--- a/pvp.lua
+++ b/pvp.lua
@@ -2,13 +2,12 @@
local S = protector.intllib
-- get static spawn position
-local statspawn = (minetest.setting_get_pos("static_spawnpoint") or {x = 0, y = 2, z = 0})
+local statspawn = minetest.setting_get_pos("static_spawnpoint") or {x = 0, y = 2, z = 0}
--- is pvp protection enabled and spawn protected
+-- is pvp protection enabled
protector.pvp = minetest.setting_getbool("protector_pvp")
-protector.spawn = (tonumber(minetest.setting_get("protector_pvp_spawn")) or 0)
--- Disable PVP in your own protected areas
+-- disables PVP in your own protected areas
if minetest.setting_getbool("enable_pvp") and protector.pvp then
if minetest.register_on_punchplayer then