1package com.osroyale.content.donators;
3import com.osroyale.content.writer.InterfaceWriter;
4import com.osroyale.content.writer.impl.InformationWriter;
5import com.osroyale.game.world.World;
6import com.osroyale.game.world.entity.mob.UpdateFlag;
7import com.osroyale.game.world.entity.mob.player.Player;
8import com.osroyale.game.world.entity.mob.player.PlayerRight;
9import com.osroyale.net.packet.out.SendAnnouncement;
10import com.osroyale.util.Utility;
11import org.apache.logging.log4j.LogManager;
12import org.apache.logging.log4j.Logger;
44* This
class handles everything related to donators.
48public class Donation {
50 private static final Logger logger = LogManager.getLogger(Donation.class);
52 private final Player player;
56 public Donation(
Player player) {
62 setCredits(getCredits() + bond.
credits);
63 player.message(
"<col=FF0000>You have claimed your donator bond. You now have " +
Utility.
formatDigits(getCredits()) +
" donator credits!");
64 World.
sendMessage(
"<col=CF2192>Tarnish: <col=" + player.right.getColor() +
">" + player.getName() +
" </col>has opened <col=CF2192>" +
Utility.
formatEnum(bond.name()) +
"");
68 public void updateRank(
boolean login) {
75 if (player.right.equals(rank)) {
88 player.message(
"Since you are an iron man, your rank icon will not change.");
100 public int getCredits() {
104 public int getSpent() {
108 public void setCredits(
int credits) {
109 this.credits = credits;
112 public void setSpent(
int spent) {
static void sendMessage(String... messages)
static String formatDigits(final int amount)
static String getAOrAn(String nextWord)
static String formatEnum(final String string)
static boolean isHelper(Player player)
static String getCrown(Player player)
static boolean isIronman(Player player)
static boolean isModerator(Player player)