mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 15:23:48 +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",
|
||||
"nodename_matcher",
|
||||
"playerdata",
|
||||
"connected_players"
|
||||
"connected_players",
|
||||
"register_on_leaveplayer"
|
||||
},
|
||||
liquid = {
|
||||
"liquid_level_max",
|
||||
|
@ -248,3 +248,7 @@ function connected_players()
|
||||
return connected_players[index]
|
||||
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