Search in sources :

Example 6 with ClanPlayer

use of com.griefdefender.api.ClanPlayer in project GDHooks by bloodmc.

the class GDClan method getLeaders.

@Override
public List<ClanPlayer> getLeaders(boolean onlineOnly) {
    final List<ClanPlayer> clanPlayers = new ArrayList<>();
    final ClanPlayer clanPlayer = GDHooks.getInstance().getClanProvider().getClanPlayer(this.pluginClan.getGuildMaster().getUuid());
    if (clanPlayer != null) {
        clanPlayers.add(clanPlayer);
    }
    return clanPlayers;
}
Also used : ArrayList(java.util.ArrayList) ClanPlayer(com.griefdefender.api.ClanPlayer)

Example 7 with ClanPlayer

use of com.griefdefender.api.ClanPlayer in project GDHooks by bloodmc.

the class GDClan method getLeaders.

@Override
public List<ClanPlayer> getLeaders(boolean onlineOnly) {
    final List<ClanPlayer> clanPlayers = new ArrayList<>();
    final ClanPlayer clanPlayer = GDHooks.getInstance().getClanProvider().getClanPlayer(this.pluginClan.getLeader());
    if (clanPlayer != null) {
        clanPlayers.add(clanPlayer);
    }
    return clanPlayers;
}
Also used : ArrayList(java.util.ArrayList) ClanPlayer(com.griefdefender.api.ClanPlayer)

Example 8 with ClanPlayer

use of com.griefdefender.api.ClanPlayer in project GDHooks by bloodmc.

the class GDClan method getMembers.

@Override
public List<ClanPlayer> getMembers(boolean onlineOnly) {
    final List<ClanPlayer> clanPlayers = new ArrayList<>();
    final List<GuildMember> members = new ArrayList<>(onlineOnly ? this.pluginClan.getOnlineMembers() : this.pluginClan.getMembers());
    for (GuildMember pluginClanPlayer : members) {
        final ClanPlayer clanPlayer = GDHooks.getInstance().getClanProvider().getClanPlayer(pluginClanPlayer.getUuid());
        if (clanPlayer != null) {
            clanPlayers.add(clanPlayer);
        }
    }
    return clanPlayers;
}
Also used : ArrayList(java.util.ArrayList) GuildMember(me.glaremasters.guilds.guild.GuildMember) ClanPlayer(com.griefdefender.api.ClanPlayer)

Example 9 with ClanPlayer

use of com.griefdefender.api.ClanPlayer in project GDHooks by bloodmc.

the class GDClan method getMembers.

@Override
public List<ClanPlayer> getMembers(boolean onlineOnly) {
    final List<ClanPlayer> clanPlayers = new ArrayList<>();
    final List<UUID> members = onlineOnly ? this.pluginClan.getOnlineMembers() : this.pluginClan.getMembers();
    for (UUID clanMemberUniqueId : members) {
        final ClanPlayer clanPlayer = GDHooks.getInstance().getClanProvider().getClanPlayer(clanMemberUniqueId);
        if (clanPlayer != null) {
            clanPlayers.add(clanPlayer);
        }
    }
    return clanPlayers;
}
Also used : ArrayList(java.util.ArrayList) UUID(java.util.UUID) ClanPlayer(com.griefdefender.api.ClanPlayer)

Aggregations

ClanPlayer (com.griefdefender.api.ClanPlayer)9 ArrayList (java.util.ArrayList)4 CommandAlias (co.aikar.commands.annotation.CommandAlias)3 CommandCompletion (co.aikar.commands.annotation.CommandCompletion)3 Description (co.aikar.commands.annotation.Description)3 Subcommand (co.aikar.commands.annotation.Subcommand)3 Syntax (co.aikar.commands.annotation.Syntax)3 Clan (com.griefdefender.api.Clan)3 Audience (com.griefdefender.lib.kyori.adventure.audience.Audience)3 Component (com.griefdefender.lib.kyori.adventure.text.Component)3 Claim (com.griefdefender.api.claim.Claim)2 TrustType (com.griefdefender.api.claim.TrustType)2 ClanConfig (com.griefdefender.hooks.config.ClanConfig)2 Player (org.bukkit.entity.Player)2 EventHandler (org.bukkit.event.EventHandler)2 CommandResult (com.griefdefender.api.CommandResult)1 ClanProvider (com.griefdefender.api.provider.ClanProvider)1 GDClanPlayer (com.griefdefender.hooks.provider.clan.uclans.GDClanPlayer)1 UUID (java.util.UUID)1 GuildMember (me.glaremasters.guilds.guild.GuildMember)1