From 062b39f4f8ff0f59aa2c48ebaf4a13615a0e7f4c Mon Sep 17 00:00:00 2001 From: Sokomine Date: Fri, 3 Nov 2017 03:07:20 +0100 Subject: [PATCH] added support for creative priv --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 9100710..05b7dcd 100644 --- a/init.lua +++ b/init.lua @@ -171,7 +171,8 @@ replacer.replace = function( itemstack, user, pointed_thing, mode ) -- in survival mode, the player has to provide the node he wants to be placed - if( not(minetest.setting_getbool("creative_mode") )) then + if( not(minetest.setting_getbool("creative_mode") ) + and not( minetest.check_player_privs( name, {creative=true}))) then -- players usually don't carry dirt_with_grass around; it's safe to assume normal dirt here -- fortionately, dirt and dirt_with_grass does not make use of rotation