]> git.lizzy.rs Git - Crafter.git/blobdiff - mods/itemhandling/magnet.lua
Fix name put in wrong place
[Crafter.git] / mods / itemhandling / magnet.lua
index 55055e3116a224bb35cb59fa4043a9bd05eceddf..9a9d7372939d4db207cf6a8769398697e971c50d 100644 (file)
@@ -23,8 +23,8 @@ local entity
 local tick = false
 local function magnet(player)
        --don't magnetize to dead players
+       name = player:get_player_name()
        if player:get_hp() > 0 then
-               name = player:get_player_name()
                pos = player:get_pos()
                inv = player:get_inventory()
                if tick == true and pool[name] > 0 then