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:
319b9ee
)
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
paramat
<mat.gregory@virginmedia.com>
Sat, 11 Nov 2017 21:34:30 +0000
(21:34 +0000)
mods/creative/init.lua
patch
|
blob
|
history
diff --git
a/mods/creative/init.lua
b/mods/creative/init.lua
index 09dc2dc7da13b89bc695b57fadf841b2d149ba94..ef190b8dc1e3a078dcffdfff11fbe51f8ba8fd5c 100644
(file)
--- a/
mods/creative/init.lua
+++ b/
mods/creative/init.lua
@@
-47,7
+47,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