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*)");