1
0
Fork 0
MineClone2/mods/MISC/mcl_privs/init.lua

17 lines
439 B
Lua
Raw Normal View History

local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_privilege("maphack", {
description = S("Can place and use advanced blocks like mob spawners, command blocks and barriers."),
})
2021-09-19 13:15:19 +02:00
minetest.register_on_joinplayer(function(player)
2021-09-19 13:18:09 +02:00
local name = player:get_player_name()
2021-09-19 13:28:07 +02:00
local fly = nil
2021-09-19 13:15:19 +02:00
if minetest.is_creative_enabled(name) then
fly = true
end
minetest.set_player_privs(name, {
fly = fly,
})
end)