Skip to content

Commit

Permalink
Replace deprecated functions with newer ones (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Panquesito7 authored and paly2 committed Oct 28, 2019
1 parent e47fd58 commit cdf1738
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ if get_setting("teleport_arrow") then
return
end

if minetest.setting_getbool("throwing.allow_teleport_in_protected") == false then
if minetest.settings:get_bool("throwing.allow_teleport_in_protected") == false then
return false
end

hitter:moveto(last_pos)
hitter:move_to(last_pos)
end
})
end
Expand Down Expand Up @@ -256,9 +256,9 @@ if get_setting("drop_arrow") then
minetest.item_drop(ItemStack(data.itemstack), hitter, last_pos)
end,
on_hit_fails = function(self, _, thrower, data)
if not minetest.setting_getbool("creative_mode") then
if not minetest.settings:get_bool("creative_mode") then
thrower:get_inventory():set_stack("main", data.index, data.itemstack)
end
end
})
end
end

0 comments on commit cdf1738

Please sign in to comment.