1package com.runehive.content.clanchannel.channel;
3import com.google.gson.JsonObject;
4import com.runehive.content.clanchannel.ClanMember;
5import com.runehive.content.clanchannel.ClanRank;
6import com.runehive.game.world.entity.mob.player.Player;
7import com.runehive.net.packet.out.SendMessage;
8import com.runehive.net.packet.out.SendScrollbar;
9import com.runehive.net.packet.out.SendString;
10import com.runehive.net.packet.out.SendTooltip;
12import java.util.Arrays;
13import java.util.Objects;
14import java.util.Optional;
25 private static final int SIZE = 4;
66 channel.message(
"The required rank to enter has changed to " + rank.
getName() +
".");
72 channel.message(
"The required rank to talk has changed to " + rank.
getName() +
".");
81 return ranks[index].getString();
121 if (
channel.bannedMembers.isEmpty()) {
122 player.
send(
new SendMessage(
"You have no banned members in your clan."));
126 int size =
channel.bannedMembers.size() < 10 ? 10 :
channel.bannedMembers.size();
127 for (
int index = 0; index < size; index++) {
128 boolean valid = index <
channel.bannedMembers.size();
129 Optional<String> banned = valid ? Optional.of(
channel.bannedMembers.get(index)) : Optional.empty();
140 channel.message(
"Lootshare has been toggled " + (
lootshare ?
"on!" :
"off!"));
145 if (obj ==
this)
return true;
148 return Objects.equals(
name, other.
name)
151 && Objects.equals(
tag, other.
tag)
Handles the clan channel member.
ClanRank rank
The rank of the clan member.
Handles the clan chat channel.
boolean equals(Object obj)
boolean locked
The locked state of the clan.
String forum
The clan forum link.
String password
The clan password.
boolean lootshare
The lootshare state of the clan.
void setManageRank(ClanRank rank)
Sets the management rank.
void showBanned(Player player)
final ClanChannel channel
The channel to manage.
static final int TALK_RANK_INDEX
void setTalkRank(ClanRank rank)
Sets the talk rank.
String slogan
The clan slogan.
void setEnterRank(ClanRank rank)
Sets the enter rank.
ClanManagement(ClanChannel channel)
static final int SIZE
The amount of privilage options.
void loadRanks(JsonObject object)
String name
The clan display name.
ClanRank[] ranks
An array of ranks.
static final int MANAGE_RANK_INDEX
static final int ENTER_RANK_INDEX
Clan rank indices.
void saveRanks(JsonObject object)
boolean canEnter(ClanMember member)
String getRank(int index)
boolean canManage(ClanMember member)
boolean canTalk(ClanMember member)
void open(int identification)
Opens an interface for the player.
This class represents a character controlled by a player.
final InterfaceManager interfaceManager
void send(OutgoingPacket encoder)
The OutgoingPacket that sends a message to a Players chatbox in the client.
The OutgoingPacket that sends a string to a Players itemcontainer in the client.
The enum containing all the rank's data within a clan channel.
boolean greaterThanEqual(ClanRank other)