From dd5a620393ee29332df18b2a51291557632211be Mon Sep 17 00:00:00 2001 From: Hugues Ross Date: Sat, 13 Jun 2020 09:08:01 -0400 Subject: [PATCH] Add cartographer privilege for using the /map command --- commands.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/commands.lua b/commands.lua index eca6c08..572a514 100644 --- a/commands.lua +++ b/commands.lua @@ -6,12 +6,20 @@ local chunk, audio, map_formspec = ...; local MAXINT = 2147483647; +minetest.register_privilege("cartographer", { + description = "Allows use of the /map command to view local area maps", + give_to_singleplayer = true, + give_to_admin = true, +}); + -- /map -- Displays a regional map around the player -- (Optional)detail: Specifies the map's detail level. Defaults to the highest -- available detail. -- (Optional)scale: Specifies the map's scale. Defaults to 1. minetest.register_chatcommand("map", { params = "[] []", + description = "Display a mapo of the local area", + privs = { cartographer = true }, func = function(name, param) local detail, scale = param:match("(%d*) (%d*)");