Use minetest.disconnect_player if available
This commit is contained in:
parent
a3637d17af
commit
28d8c66f37
@ -1425,7 +1425,13 @@ end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if(fields.leave) then
|
||||
minetest.kick_player(player:get_player_name(), S("You have voluntarily exited the tutorial."))
|
||||
local name = player:get_player_name()
|
||||
local reason = S("You have voluntarily exited the tutorial.")
|
||||
if minetest.disconnect_player then
|
||||
minetest.disconnect_player(name, reason)
|
||||
else
|
||||
minetest.kick_player(name, reason)
|
||||
end
|
||||
return
|
||||
elseif(fields.teleport) then
|
||||
teleport_dialog(player)
|
||||
|
Loading…
x
Reference in New Issue
Block a user