Don't leave a party when disconnecting (closes #9) | Add setting to leave the party when players disconnect, off by default (closes #8)
This commit is contained in:
parent
03cb6fdbdb
commit
f72b18ed2f
@ -1,2 +1,5 @@
|
||||
-- the maximum amount of players a party can have
|
||||
parties.settings.MAX_PLAYERS_PER_PARTY = 6
|
||||
parties.settings.MAX_PLAYERS_PER_PARTY = 6
|
||||
|
||||
-- whether players should automatically leave a party when disconnecting
|
||||
parties.settings.LEAVE_ON_DISCONNECT = false
|
@ -7,7 +7,7 @@ end)
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local p_name = player:get_player_name()
|
||||
|
||||
if parties.is_player_in_party(p_name) then
|
||||
if parties.is_player_in_party(p_name) and parties.settings.LEAVE_ON_DISCONNECT then
|
||||
parties.leave(p_name)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user