1package com.runehive.content.tittle;
3import com.runehive.game.world.entity.mob.UpdateFlag;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.net.packet.out.*;
6import com.runehive.util.Utility;
37 int ordinal = player.
attributes.
get(
"PLAYER_TITLE_KEY", Integer.class);
43 if (title.ordinal() == ordinal) {
46 player.
send(
new SendString((title.ordinal() == ordinal ?
"<col=DEB07A>" :
"<col=A8865E>") + title.getTitle().getTitle(),
string));
47 player.
send(
new SendTooltip(
"View title: <col=db9423>" + title.getTitle().getTitle() +
"</col>",
string - 1));
48 player.
send(
new SendConfig(config, title.activated(player) ? 1 : 0));
58 int scroll =
Title.values().length * 26;
60 for (
int index = 0; index < view.
getRequirement().length; index++) {
63 player.
send(
new SendString(
"<col=" + (view.
activated(player) ?
"A1D490>- UNLOCKED -" :
"E34F52>- LOCKED -"), 39019));
70 int ordinal = player.
attributes.
get(
"PLAYER_TITLE_KEY", Integer.class);
78 player.playerTitle = title.
getTitle();
80 player.
send(
new SendMessage(
"You have successfully redeemed your title."));
88 player.
send(
new SendMessage(
"You have successfully reset your title."));
String getTitle()
Gets the title.
static PlayerTitle empty()
Creates an empty player title.
int getColor()
Gets the color.
Handles unlocking player titles.
static void refresh(Player player)
Handles refreshing (send all strings and data) the itemcontainer.
static void reset(Player player)
Handles reseting the player title.
static void redeem(Player player)
Handles a player redeeming a title.
static void open(Player player)
Opens the title itemcontainer.
static final int BUTTON_IDENTIFICATION
The base button identification.
static boolean click(Player player, int button)
Handles clicking buttons on the title itemcontainer.
final EnumSet< UpdateFlag > updateFlags
final GenericAttributes attributes
void open(int identification)
Opens an interface for the player.
This class represents a character controlled by a player.
String getName()
Gets the name of this entity.
final InterfaceManager interfaceManager
void send(OutgoingPacket encoder)
The OutgoingPacket responsible for changing settings on a client.
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.
Handles miscellaneous methods.
static String formatName(final String input)
public< K, E > E get(K key)
Gets a generic attribute.
public< K, E > void set(K key, E attribute)
Sets a generic attribute.
Holds all the title data that can be redeemed using the title interface.
static Optional< Title > forOrdinal(int ordinal)
String[] getRequirement()
boolean activated(final T player)