mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 09:13:53 +01:00
Add modlib.minetest.register_on_leaveplayer
This commit is contained in:
parent
5ae7cc254f
commit
a792aa2e31
@ -25,7 +25,8 @@ for filename, comps in pairs{
|
|||||||
"objects_inside_area",
|
"objects_inside_area",
|
||||||
"nodename_matcher",
|
"nodename_matcher",
|
||||||
"playerdata",
|
"playerdata",
|
||||||
"connected_players"
|
"connected_players",
|
||||||
|
"register_on_leaveplayer"
|
||||||
},
|
},
|
||||||
liquid = {
|
liquid = {
|
||||||
"liquid_level_max",
|
"liquid_level_max",
|
||||||
|
@ -248,3 +248,7 @@ function connected_players()
|
|||||||
return connected_players[index]
|
return connected_players[index]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function register_on_leaveplayer(func)
|
||||||
|
return minetest["register_on_" .. (minetest.is_singleplayer() and "shutdown" or "leaveplayer")](func)
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user