core_namespace: fix player type in core.register_allow_player_inventory_action & core.register_on_player_inventory_action

This commit is contained in:
Van
2026-04-19 21:36:29 +03:00
parent 19803a076d
commit 8b995b5176

View File

@@ -571,14 +571,14 @@ function core.register_craft_predict(callback) end
--- moved. A value of `-1` for `take` will make the source stack infinite. --- moved. A value of `-1` for `take` will make the source stack infinite.
--- ---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4720-L4731) --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4720-L4731)
--- @param callback fun(player:ObjectRef, action:"move"|"put"|"take", inventory:InvRef, inventory_info:table):integer? --- @param callback fun(player:ObjectRef|Player, action:"move"|"put"|"take", inventory:InvRef, inventory_info:table):integer?
function core.register_allow_player_inventory_action(callback) end function core.register_allow_player_inventory_action(callback) end
--- * Called after a take, put or move event from/to/in a player inventory --- * Called after a take, put or move event from/to/in a player inventory
--- * Function arguments: see `core.register_allow_player_inventory_action` --- * Function arguments: see `core.register_allow_player_inventory_action`
--- * Does not accept or handle any return value. --- * Does not accept or handle any return value.
--- ---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4732-L4735) --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4732-L4735)
--- @param callback fun(player:ObjectRef, action:"move"|"put"|"take", inventory:InvRef, inventory_info:table):integer? --- @param callback fun(player:ObjectRef|Player, action:"move"|"put"|"take", inventory:InvRef, inventory_info:table):integer?
function core.register_on_player_inventory_action(callback) end function core.register_on_player_inventory_action(callback) end
--- * Called by `builtin` and mods when a player violates protection at a --- * Called by `builtin` and mods when a player violates protection at a
--- position (eg, digs a node or punches a protected entity). --- position (eg, digs a node or punches a protected entity).