forked from Upstream/mmocore
Support for KingdomsX
This commit is contained in:
parent
db90693676
commit
fd3a245125
@ -6,6 +6,7 @@ import com.massivecraft.factions.Faction;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.guild.AbstractGuild;
|
||||
import net.Indyuce.mmocore.guild.GuildModule;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class FactionsGuildModule implements GuildModule {
|
||||
|
||||
@ -16,6 +17,8 @@ public class FactionsGuildModule implements GuildModule {
|
||||
}
|
||||
|
||||
class CustomGuild implements AbstractGuild {
|
||||
|
||||
@NotNull
|
||||
private final Faction faction;
|
||||
|
||||
CustomGuild(Faction faction) {
|
||||
|
@ -5,6 +5,7 @@ import me.glaremasters.guilds.guild.Guild;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.guild.AbstractGuild;
|
||||
import net.Indyuce.mmocore.guild.GuildModule;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class GuildsGuildModule implements GuildModule {
|
||||
|
||||
@ -15,6 +16,8 @@ public class GuildsGuildModule implements GuildModule {
|
||||
}
|
||||
|
||||
class CustomGuild implements AbstractGuild {
|
||||
|
||||
@NotNull
|
||||
private final Guild guild;
|
||||
|
||||
CustomGuild(Guild guild) {
|
||||
|
@ -3,16 +3,28 @@ package net.Indyuce.mmocore.guild.compat;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.guild.AbstractGuild;
|
||||
import net.Indyuce.mmocore.guild.GuildModule;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.kingdoms.constants.kingdom.Kingdom;
|
||||
import org.kingdoms.constants.player.KingdomPlayer;
|
||||
import org.kingdoms.main.Kingdoms;
|
||||
|
||||
public class KingdomsXGuildModule implements GuildModule {
|
||||
|
||||
@Override
|
||||
public AbstractGuild getGuild(PlayerData playerData) {
|
||||
throw new RuntimeException("Not supported");
|
||||
KingdomPlayer kPlayer = Kingdoms.get().getDataHandlers().getKingdomPlayerManager().getData(playerData.getUniqueId());
|
||||
Kingdom kingdom = kPlayer == null ? null : kPlayer.getKingdom();
|
||||
return kingdom == null ? null : new CustomGuild(kingdom);
|
||||
}
|
||||
|
||||
class CustomGuild implements AbstractGuild {
|
||||
CustomGuild() {
|
||||
|
||||
@NotNull
|
||||
private final Kingdom kingdom;
|
||||
|
||||
CustomGuild(Kingdom kingdom) {
|
||||
this.kingdom = kingdom;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.guild.AbstractGuild;
|
||||
import net.Indyuce.mmocore.guild.GuildModule;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class UltimateClansGuildModule implements GuildModule {
|
||||
private static final UClans API = (UClans) Bukkit.getPluginManager().getPlugin("UltimateCLans");
|
||||
@ -15,8 +16,9 @@ public class UltimateClansGuildModule implements GuildModule {
|
||||
return API.getPlayerAPI().hasClan(playerData.getUniqueId()) ? new CustomGuild(API.getClanAPI().getClan(API.getPlayerAPI().getClanID(playerData.getUniqueId()))) : null;
|
||||
}
|
||||
|
||||
|
||||
class CustomGuild implements AbstractGuild {
|
||||
|
||||
@NotNull
|
||||
private final ClanData clan;
|
||||
|
||||
CustomGuild(ClanData clan) {
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class DungeonsPartyModule implements PartyModule {
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user