1package com.runehive.content.clanchannel.content;
3import com.runehive.Config;
4import com.runehive.content.clanchannel.ClanMember;
5import com.runehive.content.clanchannel.ClanRepository;
6import com.runehive.content.clanchannel.channel.ClanChannel;
7import com.runehive.content.clanchannel.channel.ClanChannelHandler;
8import com.runehive.game.world.entity.mob.player.Player;
9import com.runehive.game.world.items.Item;
10import com.runehive.net.packet.out.*;
11import com.runehive.util.Difficulty;
12import com.runehive.util.Utility;
28 public List<ClanChannel>
clanList =
new ArrayList<>();
64 player.interfaceManager.open(interfaceId);
69 if (channels ==
null)
return;
73 int size = channels.size() > 13 ? channels.size() : 13;
74 Iterator<ClanChannel> iterator = channels.iterator();
75 for (
int index = 0,
string = 53202; index < size; index++,
string += 2) {
76 if (iterator.hasNext()) {
78 String prefix = (index + 1) +
")";
86 clanList =
new ArrayList<>(channels);
92 assert strings.length != 0;
93 for (
int index = 0,
string = 53102; index < strings.length; index++,
string += 2) {
94 player.send(
new SendString(strings[index] ==
null ?
"" : strings[index],
string));
101 return new String[10];
104 "</col>Established: " +
viewing.getColor() +
"" +
viewing.getDetails().established,
105 "</col>Members: " +
viewing.getColor() +
"" +
viewing.getMembers().size(),
108 "</col>Tag " +
viewing.getColor() +
"" + (
viewing.getTag().length() <= 0 ?
"None" : (
"[" +
viewing.getTag()) +
"]"),
111 "</col>Achievements Completed: " +
viewing.getColor() +
"NA",
112 "</col>Tasks Completed: " +
viewing.getColor() +
"NA",
114 "</col>Avg. Total: " +
viewing.getColor() +
"" +
viewing.getDetails().getAverageTotal(),
120 return new String[10];
136 List<ClanMember> membersList =
new ArrayList<>(size);
142 size = membersList.size() < 18 ? 18 : membersList.size();
144 for (
int i = 0,
string = 55052; i < size; i++,
string += 2) {
145 boolean valid = i < membersList.size();
146 ClanMember member = valid ? membersList.get(i) :
null;
147 String name = valid ? member.
rank.
getString() +
" " + member.name :
"";
164 for (
int index = 0,
string = 55012; index < strings.length; index++,
string += 2) {
165 player.send(
new SendString(strings[index] ==
null ?
"" : strings[index],
string));
170 if (
player.interfaceManager.isInterfaceOpen(53000))
183 for (
int index = 0,
string = 37114; index < size; index++,
string++) {
189 if (old != difficulty) {
208 player.send(
new SendString(
"<col=000000>These are all the clan achievements available", 37111));
209 player.send(
new SendString(
"<col=000000>Completed achievements will be highlighted in <col=347043>green</col>", 37112));
215 player.interfaceManager.open(37100);
The class that contains setting-related constants for the server.
static final int CLAN_TAB
Handles the clan channel member.
ClanRank rank
The rank of the clan member.
int playerKills
The players killed by the clan member.
final String name
The name of the clan member.
double expGained
The experienced gained by the clan member.
String joined
The join date of the clan member.
int npcKills
The npcs killed by the clan member.
The repository containing all the clans and their corresponding data.
static Optional< Set< ClanChannel > > getTopChanels(ClanType type)
The handler for the clan channel.
static void manage(Player player)
Handles the clan chat channel.
void open(ClanChannel channel, ClanTab tab)
String[] getDetails()
Gets the clan information details.
List< ClanChannel > clanList
List< ClanMember > clanMembers
String[] getProfile(ClanMember member)
void update(ClanChannel channel)
ClanViewer(Player player)
void drawClanList(String key)
This class represents a character controlled by a player.
The container class that represents an item that can be interacted with.
The OutgoingPacket responsible for changing settings on a client.
The OutgoingPacket that sends a string to a Players itemcontainer in the client.
Handles miscellaneous methods.
static String formatName(final String input)
static String formatDigits(final int amount)
Formats digits for integers.
static double getPercentageAmount(int progress, int total)
Gets a percentage amount.
static String formatEnum(final String string)
Formats name of enum.
final String name
The name of the clan rank.
Handles the clan achievements.
static Optional< ClanAchievement > forOrdinal(int ordinal)
Gets the clan achivement based on the ordinal.
Created by Daniel on 2017-11-27.