From 9973025ff76f86cd746e7791953a74c1496a92ad Mon Sep 17 00:00:00 2001 From: tacigar Date: Wed, 11 Jan 2017 10:57:26 +0900 Subject: [PATCH] Modify nametag --- maidroid_tool/nametag.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maidroid_tool/nametag.lua b/maidroid_tool/nametag.lua index 0bff770..2979d17 100644 --- a/maidroid_tool/nametag.lua +++ b/maidroid_tool/nametag.lua @@ -28,7 +28,7 @@ minetest.register_craftitem("maidroid_tool:nametag", { if not obj:is_player() and luaentity then local name = luaentity.name - if maidroid.registered_maidroids[name] and not luaentity:is_named() then + if maidroid.registered_maidroids[name] then local player_name = user:get_player_name() minetest.show_formspec(player_name, "maidroid_tool:nametag", formspec) @@ -51,8 +51,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local luaentity = maidroid_buf[player:get_player_name()] luaentity.nametag = fields.name - luaentity.object:set_nametag_attributes{ - text = fields.name, + luaentity.object:set_properties{ + nametag = fields.name, } end end)