projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca38bb2
)
Creative: Make the placenode registration check for non-player placers
author
raymoo
<raymoo@users.noreply.github.com>
Mon, 2 Oct 2017 01:32:01 +0000
(18:32 -0700)
committer
sfan5
<sfan5@live.de>
Sun, 19 Nov 2017 22:03:38 +0000
(23:03 +0100)
mods/creative/init.lua
patch
|
blob
|
history
diff --git
a/mods/creative/init.lua
b/mods/creative/init.lua
index a33475dd98ebf5a9fd284cd7de6d78fe30515dcb..2a590e34f7ffa0be9526762f2bdf25697df5bd54 100644
(file)
--- a/
mods/creative/init.lua
+++ b/
mods/creative/init.lua
@@
-40,7
+40,9
@@
end
-- Unlimited node placement
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
- return creative.is_enabled_for(placer:get_player_name())
+ if placer and placer:is_player() then
+ return creative.is_enabled_for(placer:get_player_name())
+ end
end)
-- Don't pick up if the item is already in the inventory