summaryrefslogtreecommitdiff
path: root/triggers.lua
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2016-07-29 17:47:56 +0100
committerrubenwardy <rubenwardy@gmail.com>2016-07-29 17:47:56 +0100
commitc79f13a4a3199a18c62297ece3f81fac40a64370 (patch)
treef3272d208f969dcdd443fba910af84ef82778e16 /triggers.lua
parent48ae01221097adc269b90763a53d907a31356e59 (diff)
Fix bug with getting player data, and release 2.1.1v2.1.1
Diffstat (limited to 'triggers.lua')
-rw-r--r--triggers.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/triggers.lua b/triggers.lua
index 809388c..cf8dced 100644
--- a/triggers.lua
+++ b/triggers.lua
@@ -78,7 +78,8 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
if not digger or not pos or not oldnode then
return
end
- local data = awards.players[playern]
+
+ local data = awards.players[digger:get_player_name()]
if not awards.increment_item_counter(data, "count", oldnode.name) then
return
end
@@ -100,7 +101,7 @@ minetest.register_on_placenode(function(pos, node, digger)
if not digger or not pos or not node or not digger:get_player_name() or digger:get_player_name()=="" then
return
end
- local data = awards.players[playern]
+ local data = awards.players[digger:get_player_name()]
if not awards.increment_item_counter(data, "place", node.name) then
return
end
@@ -124,7 +125,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
return
end
- local data = awards.players[playern]
+ local data = awards.players[player:get_player_name()]
if not awards.increment_item_counter(data, "craft", itemstack:get_name()) then
return
end