diff options
author | James Stevenson <everamzah@gmail.com> | 2016-09-09 11:42:22 -0400 |
---|---|---|
committer | James Stevenson <everamzah@gmail.com> | 2016-09-09 11:42:22 -0400 |
commit | f46a279600c5fe5a6a23ad5b33a0504d9868fd15 (patch) | |
tree | b7051e63da774f0f503bd276fc33eb22fabcaf20 | |
parent | 877ef09eedba7663b2c8e5be1e017499a6ffd5c0 (diff) |
Show areas in chat
/pvp_areas without arguments lists areas to chat.
-rw-r--r-- | init.lua | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -84,13 +84,12 @@ minetest.register_chatcommand("pvp_areas", { elseif param ~= "" then minetest.chat_send_player(name, "Invalid usage. Type \"/help pvp_areas\" for more information.") else - minetest.chat_send_player(name, "Listing information to STDOUT.") - print() - print("---") - for i = 0, #pvp_areas - 1 do - print(dump(pvp_areas_store:get_area(i))) + for k, v in pairs(pvp_areas) do + local id = k - 1 + local min = v.min + local max = v.max + minetest.chat_send_player(name, id .. ": " .. minetest.pos_to_string(min) .. " " .. minetest.pos_to_string(max)) end - print() end end }) |