Skip to content
Snippets Groups Projects
Commit 01571753 authored by tenplus1's avatar tenplus1 Committed by paramat
Browse files

Creative: Add 'creative' privilege for survival servers

This adds a 'creative' privilege to survival servers which OPs can bestow
on admin or competent builders to give access to the creative inventory.
parent b3f17cda
No related branches found
No related tags found
No related merge requests found
creative = {}
minetest.register_privilege("creative", {
description = "Allow player to use creative inventory",
give_to_singleplayer = false
})
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
function creative.is_enabled_for(name)
return creative_mode_cache
return creative_mode_cache or
minetest.check_player_privs(name, {creative = true})
end
dofile(minetest.get_modpath("creative") .. "/inventory.lua")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment