diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2015-08-31 11:23:34 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2015-08-31 11:23:34 +0100 |
commit | d069046c2ea1905237791b81b6e0a8f3ecb66d33 (patch) | |
tree | 95bdd736c279bf13ba8d8398a8432a9733be36fb | |
parent | ba35657b0c36c7b4f386333e21e54d653af401af (diff) |
Tweaked and tidied code
-rw-r--r-- | init.lua | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -6,7 +6,7 @@ local statspawn = (minetest.setting_get_pos("static_spawnpoint") or {x = 0, y = protector = {} protector.mod = "redo" protector.radius = (tonumber(minetest.setting_get("protector_radius")) or 5) -protector.pvp = minetest.setting_get("protector_pvp") or false +protector.pvp = minetest.setting_getbool("protector_pvp") protector.spawn = (tonumber(minetest.setting_get("protector_pvp_spawn")) or 0) protector.get_member_list = function(meta) @@ -708,7 +708,7 @@ minetest.register_craft({ }) -- Disable PVP in your own protected areas -if minetest.setting_getbool("enable_pvp") and protector.pvp == "true" then +if minetest.setting_getbool("enable_pvp") and protector.pvp then if minetest.register_on_punchplayer then @@ -716,7 +716,7 @@ if minetest.setting_getbool("enable_pvp") and protector.pvp == "true" then function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage) if not player or not hitter then - print("on_punchplayer called with nil objects") + print("[Protector] on_punchplayer called with nil objects") end if not hitter:is_player() then @@ -742,9 +742,11 @@ if minetest.setting_getbool("enable_pvp") and protector.pvp == "true" then end) else - print("PVP protection not active, update your version of Minetest") + print("[Protector] pvp_protect not active, update your version of Minetest") end else - print("PVP is disabled in world") -end
\ No newline at end of file + print("[Protector] pvp_protect is disabled") +end + +print ("[MOD] Protector loaded")
\ No newline at end of file |