mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-29 01:05:40 +01:00
Fixes Parties throwing an error when players log out
This commit is contained in:
parent
cdfbb6ef09
commit
88760db078
@ -2,7 +2,7 @@ package net.Indyuce.mmocore.party.compat;
|
|||||||
|
|
||||||
import com.alessiodp.parties.api.Parties;
|
import com.alessiodp.parties.api.Parties;
|
||||||
import com.alessiodp.parties.api.events.bukkit.player.BukkitPartiesPlayerPostJoinEvent;
|
import com.alessiodp.parties.api.events.bukkit.player.BukkitPartiesPlayerPostJoinEvent;
|
||||||
import com.alessiodp.parties.api.events.bukkit.player.BukkitPartiesPlayerPostLeaveEvent;
|
import com.alessiodp.parties.api.events.bukkit.player.BukkitPartiesPlayerPreLeaveEvent;
|
||||||
import com.alessiodp.parties.api.interfaces.PartiesAPI;
|
import com.alessiodp.parties.api.interfaces.PartiesAPI;
|
||||||
import com.alessiodp.parties.api.interfaces.Party;
|
import com.alessiodp.parties.api.interfaces.Party;
|
||||||
import com.alessiodp.parties.api.interfaces.PartyPlayer;
|
import com.alessiodp.parties.api.interfaces.PartyPlayer;
|
||||||
@ -44,7 +44,7 @@ public class PartiesPartyModule implements PartyModule, Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerLeave(BukkitPartiesPlayerPostLeaveEvent event) {
|
public void onPlayerLeave(BukkitPartiesPlayerPreLeaveEvent event) {
|
||||||
int membersSize = event.getParty().getMembers().size();
|
int membersSize = event.getParty().getMembers().size();
|
||||||
PartyUtils.clearStatBonuses(PlayerData.get(event.getPartyPlayer().getPlayerUUID()));
|
PartyUtils.clearStatBonuses(PlayerData.get(event.getPartyPlayer().getPlayerUUID()));
|
||||||
event.getParty().getOnlineMembers()
|
event.getParty().getOnlineMembers()
|
||||||
|
Loading…
Reference in New Issue
Block a user