From a456005f7e693c7cbcd136c05b67b61d6ba65ed7 Mon Sep 17 00:00:00 2001 From: ssdaniel24 <107036969+ssdaniel24@users.noreply.github.com> Date: Fri, 31 May 2024 18:08:20 +0300 Subject: [PATCH] Clan prefix removing/adding instantly (lord-server/lord#1398) * JSON errors handling in clans.storage * Added clan field is_blocked. /clans.list shows. * /clans.show is smarter then was * Clan API: can't add player if clan is blocked * /clans.add_player is_blocked handle * clan_storage.get returns copy of table now * Clan API: new funcs is_blocked, toggle_block * Added /clans.toggle_block chat command * Clan prefix sets instantly now * Clan prefix removes instantly --- minetest_types.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/minetest_types.lua b/minetest_types.lua index f1c4c70..8ce52fa 100644 --- a/minetest_types.lua +++ b/minetest_types.lua @@ -608,13 +608,13 @@ function minetest.register_on_prejoinplayer(callback) end --- * `last_login`: The timestamp of the previous login, or nil if player is new --- --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4638-L4640) ---- @param callback fun(player:ObjectRef|Player, last_login) +--- @param callback fun(player:Player, last_login:number) function minetest.register_on_joinplayer(callback) end --- * Called when a player leaves the game --- * `timed_out`: True for timeout, false for other reasons. --- --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4641-L4643) ---- @param callback fun(player:ObjectRef|Player, timed_out) +--- @param callback fun(player:Player, timed_out:boolean) function minetest.register_on_leaveplayer(callback) end --- * Called when a client attempts to log into an account. --- * `name`: The name of the account being authenticated. @@ -1007,7 +1007,7 @@ function minetest.add_item(pos, item) end --- --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4913-L4913) --- @param name string ---- @return Player +--- @return Player|nil function minetest.get_player_by_name(name) end --- Returns a list of --- ObjectRefs.