forked from VoxeLibre/VoxeLibre
Fix bucket crash
This commit is contained in:
parent
a7d429a017
commit
9817b38904
|
@ -327,7 +327,10 @@ if mod_mcl_core then
|
||||||
"Right-click on any block to empty the bucket and put a water source on this spot.",
|
"Right-click on any block to empty the bucket and put a water source on this spot.",
|
||||||
function(pos, placer)
|
function(pos, placer)
|
||||||
-- Check protection
|
-- Check protection
|
||||||
local placer_name = placer:get_player_name()
|
local placer_name = ""
|
||||||
|
if placer ~= nil then
|
||||||
|
placer_name = placer:get_player_name()
|
||||||
|
end
|
||||||
if minetest.is_protected(pos, placer_name) then
|
if minetest.is_protected(pos, placer_name) then
|
||||||
minetest.record_protection_violation(pos, placer_name)
|
minetest.record_protection_violation(pos, placer_name)
|
||||||
return false
|
return false
|
||||||
|
@ -366,7 +369,10 @@ if mod_mclx_core then
|
||||||
"Right-click on any block to empty the bucket and put a river water source on this spot.",
|
"Right-click on any block to empty the bucket and put a river water source on this spot.",
|
||||||
function(pos, placer)
|
function(pos, placer)
|
||||||
-- Check protection
|
-- Check protection
|
||||||
local placer_name = placer:get_player_name()
|
local placer_name = ""
|
||||||
|
if placer ~= nil then
|
||||||
|
placer_name = placer:get_player_name()
|
||||||
|
end
|
||||||
if minetest.is_protected(pos, placer_name) then
|
if minetest.is_protected(pos, placer_name) then
|
||||||
minetest.record_protection_violation(pos, placer_name)
|
minetest.record_protection_violation(pos, placer_name)
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue