mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-10 12:30:17 +01:00
crabman77
482329bf1d
fix pclasse assign now if class is same, bug on join server add on_unassigned for all class
28 lines
838 B
Lua
Executable File
28 lines
838 B
Lua
Executable File
-----------------
|
|
-- Admin class --
|
|
-----------------
|
|
|
|
--
|
|
-- https://github.com/MinetestForFun/minetest-minetestforfun-server/issues/139
|
|
--
|
|
|
|
pclasses.api.register_class("admin", {
|
|
on_assigned = function(pname)
|
|
minetest.chat_send_player(pname, "Hello admin.")
|
|
end,
|
|
on_unassigned = function(pname)
|
|
end,
|
|
switch_params = {
|
|
color = {r = 255, g = 00, b = 224},
|
|
holo_item = "maptools:pick_admin"
|
|
}
|
|
})
|
|
|
|
pclasses.api.reserve_item("admin", "3d_armor:helmet_admin")
|
|
pclasses.api.reserve_item("admin", "3d_armor:chestplate_admin")
|
|
pclasses.api.reserve_item("admin", "3d_armor:leggings_admin")
|
|
pclasses.api.reserve_item("admin", "3d_armor:boots_admin")
|
|
pclasses.api.reserve_item("admin", "shields:shield_admin")
|
|
pclasses.api.reserve_item("admin", "maptools:pick_admin")
|
|
pclasses.api.reserve_item("admin", "maptools:pick_admin_with_drops")
|