1
0
minetest-mod-essentials/unified_inventory.lua

85 lines
2.7 KiB
Lua
Raw Normal View History

2024-05-17 23:04:50 +03:00
unified_inventory.register_button("ban_menu", {
type = "image",
image = "unified_inventory_ban.png",
tooltip = "Ban menu",
action = function(player)
local name = player:get_player_name()
if minetest.check_player_privs(name, {ban=true}) then
show_ban_menu(name)
else
core.chat_send_player(name, "You dont have privilege \'ban\'!")
2023-10-03 18:18:40 +03:00
end
2024-05-17 23:04:50 +03:00
end
})
2023-10-03 18:18:40 +03:00
2024-05-17 23:04:50 +03:00
unified_inventory.register_button("kick_menu", {
type = "image",
image = "unified_inventory_kick.png",
tooltip = "Kick menu",
action = function(player)
local name = player:get_player_name()
if minetest.check_player_privs(name, {kick=true}) then
show_kick_menu(name)
else
core.chat_send_player(name, "You dont have privilege \'kick\'!")
2023-10-03 18:18:40 +03:00
end
2024-05-17 23:04:50 +03:00
end
})
2023-10-03 18:18:40 +03:00
2024-05-17 23:04:50 +03:00
unified_inventory.register_button("rename_item", {
type = "image",
image = "unified_inventory_amogus.png",
tooltip = "Rename item in hand",
action = function(player)
local name = player:get_player_name()
if minetest.check_player_privs(name, {rename_item=true}) then
show_renameitem_menu(name)
else
core.chat_send_player(name, "You dont have privilege \'rename_item\'!")
2024-05-14 17:51:42 +03:00
end
2024-05-17 23:04:50 +03:00
end
})
--[[
unified_inventory.register_button("rename_me", {
type = "image",
image = "unified_inventory_amogus.png",
tooltip = "Rename yourself",
action = function(player)
local name = player:get_player_name()
if minetest.check_player_privs(name, {rename_player=true}) then
show_rename_menu(name)
else
core.chat_send_player(name, "You dont have privilege \'rename_player\'!")
2024-05-14 17:51:42 +03:00
end
2024-05-17 23:04:50 +03:00
end
})
2024-05-14 17:51:42 +03:00
2024-05-17 23:04:50 +03:00
unified_inventory.register_button("color_nickname", {
type = "image",
image = "unified_inventory_color_nickname.png",
tooltip = "Coloring your nickname",
action = function(player)
local name = player:get_player_name()
if minetest.check_player_privs(name, {colored_nickname=true}) then
show_color_menu(name)
else
core.chat_send_player(name, "You dont have privilege \'colored_nickname\'!")
2024-05-14 17:51:42 +03:00
end
2024-05-17 23:04:50 +03:00
end
})
2024-05-14 17:51:42 +03:00
2024-05-17 23:04:50 +03:00
unified_inventory.register_button("mute_menu", {
type = "image",
image = "unified_inventory_mute.png",
tooltip = "Mute menu",
action = function(player)
local name = player:get_player_name()
if minetest.check_player_privs(name, {mute=true}) then
show_mute_menu(name)
else
core.chat_send_player(name, "You dont have privilege 'mute'!")
2024-05-14 17:51:42 +03:00
end
2024-05-17 23:04:50 +03:00
end
})
]]--