1package com.runehive.game.world.entity.mob.player;
3import java.util.Arrays;
4import java.util.Optional;
12 PLAYER(
"Player",
"000000", 0, -1, 4111),
15 MANAGER(
"Manager",
"D17417", 3, -1, 4116),
16 OWNER(
"Owner",
"ED0C0C", 2, -1, 4117),
19 DONATOR(
"Donator",
"9C4B2F", 5, 10, 4112),
24 VETERAN(
"Veteran",
"B1800A", 10, -1, 4115),
26 IRONMAN(
"Ironman",
"7A6F74", 12, -1, 4112),
29 HELPER(
"Helper",
"5C5858", 15, -1, 4115),
30 GRAPHIC(
"Graphic",
"CE795A", 17, -1, 4112);
65 public static Optional<PlayerRight>
lookup(
int id) {
66 return Arrays.stream(values()).filter(it -> it.crown ==
id).findFirst();
161 return right.equals(
PLAYER) ?
"" :
"<img=" + (right.
getCrown() - 1) +
">";
165 return "<col=" + right.
getColor() +
"><img=" + (right.
getCrown() - 1) +
">";
169 return this ==
PLAYER ?
"" :
"<img=" + (
crown - 1) +
"> ";
246 else return roll * 97 / 100;
259 if (spent >=
PlayerRight.KING_DONATOR.getMoneyRequired())
261 if (spent >=
PlayerRight.EXTREME_DONATOR.getMoneyRequired())
263 if (spent >=
PlayerRight.ELITE_DONATOR.getMoneyRequired())
265 if (spent >=
PlayerRight.SUPER_DONATOR.getMoneyRequired())
267 if (spent >=
PlayerRight.DONATOR.getMoneyRequired())
305 return ordinal() > other.ordinal();
309 return ordinal() >= other.ordinal();
313 return ordinal() < other.ordinal();
317 return ordinal() <= other.ordinal();
This class represents a character controlled by a player.
final int crown
The crown identification.
int getCrown()
Gets the crown of the rank.
static int getBloodMoney(Player player)
static int getForumGroupId(PlayerRight right)
static String getCrown(PlayerRight right)
Gets the crown display.
final boolean greaterOrEqual(PlayerRight other)
static boolean isKing(Player player)
Checks if the player has king donator status.
final boolean lessOrEqual(PlayerRight other)
final boolean less(PlayerRight other)
int getRestAnimation()
Gets the rest animation of the rank.
String getName()
Gets the name of the rank.
static boolean isDonator(Player player)
Checks if the player has donator status.
final String color
The rank color.
static PlayerRight forSpent(int spent)
PlayerRight(String name, String color, int crown, int moneyRequired, int restAnimation)
Constructs a new PlayerRight.
static boolean isManager(Player player)
Checks if the player is a privileged member.
final boolean greater(PlayerRight other)
static Optional< PlayerRight > lookup(int id)
final int restAnimation
The rank rest animation.
static String getColor(PlayerRight right)
static boolean isHelper(Player player)
Checks if the player is a HELPER member.
String getColor()
Gets the color of the rank.
static boolean isSuper(Player player)
Checks if the player has super donator status.
static double getDropRateBonus(Player player)
static int getPresetAmount(Player player)
static int dropRateIncrease(Player player, int roll)
static String getCrown(Player player)
Gets the crown display.
static boolean isDeveloper(Player player)
Checks if the player has developer status.
static boolean isOwner(Player player)
static boolean isElite(Player player)
Checks if the player has elite donator status.
static boolean isIronman(Player player)
Checks if the player is an ironman.
static boolean isExtreme(Player player)
Checks if the player has extreme donator status.
static int getDepositAmount(Player player)
Gets the deposit amount.
static boolean isModerator(Player player)
Checks if the player is a management member.
final String name
The rank name.
static boolean isAdministrator(Player player)
Checks if the player is a privileged member.