mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-01-24 09:51:23 +01:00
Fixed the compatibilty issues with the parties plugin.
This commit is contained in:
parent
91b5f6b813
commit
fa3196d701
@ -7,6 +7,7 @@ import com.alessiodp.parties.api.interfaces.PartyPlayer;
|
|||||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||||
import net.Indyuce.mmocore.party.AbstractParty;
|
import net.Indyuce.mmocore.party.AbstractParty;
|
||||||
import net.Indyuce.mmocore.party.PartyModule;
|
import net.Indyuce.mmocore.party.PartyModule;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@ -14,12 +15,13 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PartiesPartyModule implements PartyModule {
|
public class PartiesPartyModule implements PartyModule {
|
||||||
private final PartiesAPI api = Parties.getApi();
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public AbstractParty getParty(PlayerData playerData) {
|
public AbstractParty getParty(PlayerData playerData) {
|
||||||
Party party = api.getParty(playerData.getUniqueId());
|
PartiesAPI api= Parties.getApi();
|
||||||
|
PartyPlayer partyPlayer = api.getPartyPlayer(playerData.getUniqueId());
|
||||||
|
Party party = api.getParty(partyPlayer.getPartyId());
|
||||||
return party == null ? null : new CustomParty(party);
|
return party == null ? null : new CustomParty(party);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user