1package com.runehive.content;
4import com.runehive.Config;
5import com.runehive.game.task.impl.DoubleExperienceEvent;
6import com.runehive.game.world.World;
7import com.runehive.game.world.entity.mob.player.Player;
8import com.runehive.game.world.entity.mob.player.PlayerRight;
9import com.runehive.game.world.items.Item;
10import com.runehive.net.packet.out.SendMessage;
11import com.runehive.net.packet.out.SendProgressBar;
12import com.runehive.net.packet.out.SendString;
13import com.runehive.util.Utility;
15import java.util.Iterator;
16import java.util.Objects;
17import java.util.TreeSet;
41 public static final int MAXIMUM = 15_000_000;
49 Iterator<Contributor> iterator =
contributors.iterator();
50 while (count++ < 3 && iterator.hasNext()) {
57 for (
int index = count; index < 3; index++) {
78 player.
message(
"Double experience is currently active which has temporarily disabled the wog.");
82 if (amount < 100_000) {
83 player.
message(
"You must contribute at least 100k into the well.");
88 player.
message(
"The well is currently active and does not need",
"any contribution.");
97 player.
message(
"You do not have the required funds to contribute!");
109 if (amount >= 250000) {
121 World.
sendMessage(
"<col=2b58a0>WOG</col>: The well has been fully replenished. 30 minutes of double XP is active.");
127 for (Iterator<Contributor> iterator =
contributors.iterator(); iterator.hasNext(); ) {
129 if (contributor.
name.equals(other.
name)) {
145 public static class Contributor implements Comparable<Contributor> {
156 public void add(
int amount) {
172 if (obj ==
this)
return true;
The class that contains setting-related constants for the server.
static boolean DOUBLE_EXPERIENCE
boolean equals(Object obj)
int compareTo(Contributor other)
Contributor(String name, PlayerRight rank, int contribution)
Handles contribution towards the well of goodwill.
static String lastContributor
The last contributor to the well.
static void activate()
Handles activating the well.
static void contribute(Player player, int amount)
Handles contributing to the well.
static final int MAXIMUM
The maximum contribution limit for the well.
static int CONTRIBUTION
The current contribution amount for the well.
static TreeSet< Contributor > contributors
The array list of contributors.
static String isActivated()
static boolean isActive()
static void add(String name, PlayerRight rank, int amount)
static String getInformation()
The information displayed on information tab.
static void open(Player player)
Opens the well itemcontainer.
An randomevent which starts double experience for 1 hour.
Represents the game world.
static void schedule(Task task)
Submits a new event.
static void sendMessage(String... messages)
Sends a global message.
void open(int identification)
Opens an interface for the player.
This class represents a character controlled by a player.
final Inventory inventory
void message(String message)
String getName()
Gets the name of this entity.
final InterfaceManager interfaceManager
void send(OutgoingPacket encoder)
The container class that represents an item that can be interacted with.
boolean remove(Item item)
Attempts to withdraw item from this container.
boolean contains(int id)
Determines if this container contains id.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles sending the progress bar data to the client.
The OutgoingPacket that sends a string to a Players itemcontainer in the client.
Handles miscellaneous methods.
static String formatDigits(final int amount)
Formats digits for integers.
static double getPercentageAmount(int progress, int total)
Gets a percentage amount.
Holds all the player right data.
static String getCrown(Player player)
Gets the crown display.