RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.tittle.PlayerTitle Class Reference

The player title class. More...

Collaboration diagram for com.runehive.content.tittle.PlayerTitle:

Public Member Functions

boolean equals (Object obj)
int getColor ()
 Gets the color.
String getTitle ()
 Gets the title.
int hashCode ()

Static Public Member Functions

static PlayerTitle create (String title)
 Creates a player title.
static PlayerTitle create (String title, int color)
 Creates a player title.
static PlayerTitle empty ()
 Creates an empty player title.

Private Member Functions

 PlayerTitle (String title, int color)
 Constructs a new PlayerTitle.

Private Attributes

final int color
 The title color.
final String title
 The title string.

Static Private Attributes

static final PlayerTitle EMPTY = new PlayerTitle("", 0xC74C1C)
 An empty title.

Detailed Description

The player title class.

Author
Daniel.

Definition at line 10 of file PlayerTitle.java.

Constructor & Destructor Documentation

◆ PlayerTitle()

com.runehive.content.tittle.PlayerTitle.PlayerTitle ( String title,
int color )
private

Constructs a new PlayerTitle.

Definition at line 22 of file PlayerTitle.java.

22 {
23 this.title = title;
24 this.color = color;
25 }

References color, and title.

Referenced by create(), create(), empty(), and equals().

Here is the caller graph for this function:

Member Function Documentation

◆ create() [1/2]

PlayerTitle com.runehive.content.tittle.PlayerTitle.create ( String title)
static

Creates a player title.

Definition at line 33 of file PlayerTitle.java.

33 {
34 return new PlayerTitle(title, 0xC74C1C);
35 }

References PlayerTitle(), and title.

Here is the call graph for this function:

◆ create() [2/2]

PlayerTitle com.runehive.content.tittle.PlayerTitle.create ( String title,
int color )
static

Creates a player title.

Definition at line 28 of file PlayerTitle.java.

28 {
29 return new PlayerTitle(title, color);
30 }

References color, PlayerTitle(), and title.

Referenced by com.runehive.net.packet.in.ColorPacketListener.handlePacket().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ empty()

PlayerTitle com.runehive.content.tittle.PlayerTitle.empty ( )
static

Creates an empty player title.

Definition at line 38 of file PlayerTitle.java.

38 {
39 return EMPTY;
40 }

References EMPTY, and PlayerTitle().

Referenced by com.runehive.content.tittle.TitleManager.reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ equals()

boolean com.runehive.content.tittle.PlayerTitle.equals ( Object obj)

Definition at line 53 of file PlayerTitle.java.

53 {
54 if (!(obj instanceof PlayerTitle))
55 return false;
56 final PlayerTitle other = (PlayerTitle) obj;
57 return title.equals(other.getTitle()) && other.getColor() == getColor();
58 }

References getColor(), getTitle(), PlayerTitle(), and title.

Here is the call graph for this function:

◆ getColor()

int com.runehive.content.tittle.PlayerTitle.getColor ( )

Gets the color.

Definition at line 48 of file PlayerTitle.java.

48 {
49 return color;
50 }

References color.

Referenced by com.runehive.net.packet.out.SendPlayerUpdate.appendAppearanceMask(), equals(), and com.runehive.content.tittle.TitleManager.refresh().

Here is the caller graph for this function:

◆ getTitle()

String com.runehive.content.tittle.PlayerTitle.getTitle ( )

Gets the title.

Definition at line 43 of file PlayerTitle.java.

43 {
44 return title;
45 }

References title.

Referenced by com.runehive.net.packet.out.SendPlayerUpdate.appendAppearanceMask(), equals(), com.runehive.net.packet.in.ColorPacketListener.handlePacket(), and com.runehive.content.tittle.TitleManager.refresh().

Here is the caller graph for this function:

◆ hashCode()

int com.runehive.content.tittle.PlayerTitle.hashCode ( )

Definition at line 61 of file PlayerTitle.java.

61 {
62 return Objects.hash(title, color);
63 }

References color, and title.

Member Data Documentation

◆ color

final int com.runehive.content.tittle.PlayerTitle.color
private

The title color.

Definition at line 19 of file PlayerTitle.java.

Referenced by create(), getColor(), hashCode(), and PlayerTitle().

◆ EMPTY

final PlayerTitle com.runehive.content.tittle.PlayerTitle.EMPTY = new PlayerTitle("", 0xC74C1C)
staticprivate

An empty title.

Definition at line 13 of file PlayerTitle.java.

Referenced by empty().

◆ title

final String com.runehive.content.tittle.PlayerTitle.title
private

The title string.

Definition at line 16 of file PlayerTitle.java.

Referenced by create(), create(), equals(), getTitle(), hashCode(), and PlayerTitle().


The documentation for this class was generated from the following file: