tidy code, add protected spawn feature
This commit is contained in:
parent
fdbb241518
commit
9c5fd8b6ef
4 changed files with 101 additions and 54 deletions
7
pvp.lua
7
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue