RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
PlayerTitle.java
1package com.osroyale.content.tittle;
2
3import java.util.Objects;
4
43
44public final class PlayerTitle {
45
47 private static final PlayerTitle EMPTY = new PlayerTitle("", 0xC74C1C);
48
50 private final String title;
51
53 private final int color;
54
56 private PlayerTitle(String title, int color) {
57 this.title = title;
58 this.color = color;
59 }
60
62 public static PlayerTitle create(String title, int color) {
63 return new PlayerTitle(title, color);
64 }
65
67 public static PlayerTitle create(String title) {
68 return new PlayerTitle(title, 0xC74C1C);
69 }
70
72 public static PlayerTitle empty() {
73 return EMPTY;
74 }
75
77 public String getTitle() {
78 return title;
79 }
80
82 public int getColor() {
83 return color;
84 }
85
86 @Override
87 public boolean equals(Object obj) {
88 if (!(obj instanceof PlayerTitle))
89 return false;
90 final PlayerTitle other = (PlayerTitle) obj;
91 return title.equals(other.getTitle()) && other.getColor() == getColor();
92 }
93
94 @Override
95 public int hashCode() {
96 return Objects.hash(title, color);
97 }
98}
static PlayerTitle create(String title, int color)
static PlayerTitle create(String title)