0.7.4
This commit is contained in:
parent
9bae3b02d4
commit
8dcdce2b39
@ -43,6 +43,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
player:set_properties({
|
||||
nametag_color = fields.color
|
||||
})
|
||||
player:get_meta():set_string("essentials_color", fields.color)
|
||||
minetest.sound_play("clicked", name)
|
||||
minetest.close_formspec(name, formname)
|
||||
end
|
||||
|
15
ui/ip.lua
Normal file
15
ui/ip.lua
Normal file
@ -0,0 +1,15 @@
|
||||
local FORMNAME = "essentials:ip_command"
|
||||
|
||||
function show_ip_info(name)
|
||||
local formspec = "formspec_version[6]"..
|
||||
"size[10.5,4.5]"..
|
||||
"textarea[0.6,0.45;9.2,5.7;;;If you want to use /ip command, you must send a mail to the next address:\n\n"..core.colorize("blue", "SkyBuilderOFFICAL@yandex.ru").."\n\nAnd your message must have that text:\n\n\"I want to use a /ip command for Essentials mod in Minetest.\"\n\"Add a nickname \'Player\' in trusted ip users\"\n\nIf you will accepted, creator will put you in list of trusted ip users and you will can use /ip command]"
|
||||
minetest.show_formspec(name, FORMNAME, formspec)
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= FORMNAME then
|
||||
return
|
||||
end
|
||||
return
|
||||
end)
|
@ -1,6 +1,13 @@
|
||||
local FORMNAME = "essentials:rename_item"
|
||||
|
||||
function show_renameitem_menu(name)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if player:get_wielded_item():get_name() == "" then
|
||||
minetest.chat_send_player(name, core.colorize("red", "Cant rename an empty item."))
|
||||
minetest.sound_play("error")
|
||||
return
|
||||
end
|
||||
|
||||
local formspec = string.format([[
|
||||
formspec_version[6]
|
||||
size[9.6,9.6]
|
||||
|
@ -47,7 +47,12 @@ minetest.register_on_player_receive_fields(function(player, formname, field)
|
||||
if new_name == "" then
|
||||
minetest.chat_send_player(name, core.colorize("red", "New name cannot be empty!"))
|
||||
minetest.sound_play("error")
|
||||
elseif color == "" then
|
||||
return
|
||||
end
|
||||
minetest.get_player_by_name(name):set_properties({
|
||||
nametag_color = "",
|
||||
})
|
||||
if color == "" then
|
||||
hide_names[name] = new_name
|
||||
minetest.chat_send_player(name, core.colorize("green", "Name changed to '".. new_name .."'"))
|
||||
minetest.sound_play("done")
|
||||
@ -73,16 +78,21 @@ minetest.register_on_player_receive_fields(function(player, formname, field)
|
||||
if new_name == "" then
|
||||
minetest.chat_send_player(name, core.colorize("red", "New name cannot be empty!"))
|
||||
minetest.sound_play("error")
|
||||
elseif color == "" then
|
||||
return
|
||||
end
|
||||
minetest.get_player_by_name(othername):set_properties({
|
||||
nametag_color = "",
|
||||
})
|
||||
if color == "" then
|
||||
hide_names[name] = new_name
|
||||
minetest.chat_send_player(name, core.colorize("green", "Name of ".. othername .." changed to '".. new_name .."'"))
|
||||
if essentials.changed_by then
|
||||
minetest.chat_send_player(othername, core.colorize("green", "Your name changed to \'".. new_name .."\' by ".. name))
|
||||
end
|
||||
minetest.sound_play("done")
|
||||
|
||||
minetest.get_player_by_name(othername):set_properties({
|
||||
nametag = "*".. new_name,
|
||||
nametag_color = "#AAAAAA"
|
||||
nametag = core.colorize("#AAAAAA", "*"..new_name),
|
||||
})
|
||||
minetest.close_formspec(name, formname)
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user