RuneHive-Game
Loading...
Searching...
No Matches
DuelArenaActivity.java
Go to the documentation of this file.
1package com.runehive.content.activity.impl.duelarena;
2
3import com.runehive.content.activity.Activity;
4import com.runehive.content.activity.ActivityDeathType;
5import com.runehive.content.activity.ActivityType;
6import com.runehive.content.activity.panel.ActivityPanel;
7import com.runehive.content.activity.panel.Activity_Panel;
8import com.runehive.content.consume.FoodData;
9import com.runehive.content.event.impl.ObjectInteractionEvent;
10import com.runehive.game.Animation;
11import com.runehive.game.Graphic;
12import com.runehive.game.world.entity.Entity;
13import com.runehive.game.world.entity.combat.CombatType;
14import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
15import com.runehive.game.world.entity.mob.Mob;
16import com.runehive.game.world.entity.mob.player.Player;
17import com.runehive.game.world.entity.mob.player.exchange.ExchangeSessionType;
18import com.runehive.game.world.entity.mob.player.exchange.duel.StakeSession;
19import com.runehive.game.world.items.Item;
20import com.runehive.game.world.items.containers.ItemContainer;
21import com.runehive.game.world.items.containers.equipment.Equipment;
22import com.runehive.game.world.items.containers.equipment.EquipmentType;
23import com.runehive.game.world.items.containers.pricechecker.PriceType;
24import com.runehive.game.world.pathfinding.TraversalMap;
25import com.runehive.game.world.position.Position;
26import com.runehive.net.packet.out.SendEntityHintArrow;
27import com.runehive.net.packet.out.SendItemOnInterface;
28import com.runehive.net.packet.out.SendMessage;
29import com.runehive.net.packet.out.SendString;
30import com.runehive.util.Utility;
31
32import java.util.Objects;
33import java.util.Optional;
34
35import static com.runehive.game.world.entity.combat.attack.FormulaFactory.rollDefensive;
36import static com.runehive.game.world.entity.combat.attack.FormulaFactory.rollOffensive;
37
38/**
39 * The duel arena activity.
40 *
41 * @author Michael | Chex
42 */
43public class DuelArenaActivity extends Activity {
44
45 /** The mid-points of all three duel arenas. */
46 private static final Position[] ARENAS = {
47 new Position(3345, 3251),
48 new Position(3378, 3251),
49 new Position(3345, 3213),
50 new Position(3379, 3213)
51 };
52
53 /** The mid-points of all three obstacle duel arenas. */
54 private static final Position[] OBSTACLE_ARENAS = {
55 new Position(3376, 3251),
56 new Position(3345, 3231),
57 new Position(3376, 3213)
58 };
59
60 /** The south-west tile of the hospital bed area. */
61 private static final Position HOSPITAL_BEDS_SOUTHWEST = new Position(3361, 3272);
62
63 /** The duel rules for this duel session. */
64 public final DuelRules rules = new DuelRules();
65
66 /** The duel stake session (holds items). */
67 private final StakeSession session;
68
69 /** The player requesting the duel. */
71
72 /** The player accepting the duel. */
74
75 /** The player activity panel. */
77
78 /** The opponent activity panel. */
80
81 /** The combat listener for the duel. */
82 private final DuelArenaListener listener = new DuelArenaListener(this);
83
84 /** Whether or not the reward has been given. */
85 private boolean rewarded;
86
87 /** Whether or not the duel has started. */
88 public boolean started;
89
90 /** The duel outcome. */
92
93 public boolean hasLoser;
94
96 super(1, Entity.DEFAULT_INSTANCE);
97 this.session = session;
98 this.player = player;
99 this.opponent = opponent;
100 }
101
104 duel.pause();
105 duel.add(player);
106 duel.add(opponent);
107 duel.playerPanel = new DuelPanel(duel, player);
108 duel.opponentPanel = new DuelPanel(duel, opponent);
109 return duel;
110 }
111
112 @Override
113 public void sequence() {
114 super.sequence();
115
116 if (isPaused()) {
117 return;
118 }
119
120 if (!session.accepted) {
121 player.exchangeSession.reset(ExchangeSessionType.DUEL);
122 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
124 return;
125 }
126
127 if (getTicks() < 0) {
128 return;
129 }
130
131 if (getTicks() == 0) {
132 if (started) {
134 return;
135 }
136
137 player.speak("FIGHT!");
138 opponent.speak("FIGHT!");
139 started = true;
140
141 // 10 minutes, has to be x2 because 2 players sequence this activity
142 cooldown(2000);
143 } else if (!started && getTicks() <= 6 && getTicks() % 2 == 0) {
144 if (getTicks() == 6) {
145 playerPanel.open();
146 opponentPanel.open();
147 }
148
149 player.speak(String.valueOf(getTicks() / 2));
150 opponent.speak(String.valueOf(getTicks() / 2));
151 }
152 }
153
154 @Override
155 protected void start() {
158
159 player.playerAssistant.restore();
160 opponent.playerAssistant.restore();
161
162 if (rules.contains(DuelRule.OBSTACLES)) {
163 player.move(TraversalMap.getRandomTraversableTile(OBSTACLE_ARENAS[0].transform(-3, -3), 3, 3));
164 opponent.move(TraversalMap.getRandomTraversableTile(OBSTACLE_ARENAS[0].transform(3, -3), 3, 3));
165 } else if (rules.contains(DuelRule.NO_MOVEMENT)) {
166 Position position = ARENAS[0].transform(-9, -7);
167 position = TraversalMap.getRandomTraversableTile(position, 18, 9);
168 if (position == null) {
170 return;
171 }
172 player.move(position);
173 position = TraversalMap.getRandomNonDiagonal(position);
174 if (position == null) {
176 return;
177 }
178 opponent.move(position);
179 player.face(opponent);
180 opponent.face(player);
181 } else {
182 player.move(TraversalMap.getRandomTraversableTile(ARENAS[0].transform(-3, -3), 3, 3));
183 opponent.move(TraversalMap.getRandomTraversableTile(ARENAS[0].transform(3, -3), 3, 3));
184 }
185
186 player.send(new SendEntityHintArrow(opponent, false));
187 opponent.send(new SendEntityHintArrow(player, false));
188 cooldown(8);
189 }
190
191 @Override
192 public void finish() {
193 if (rewarded) {
194 return;
195 }
196
197 player.playerAssistant.restore();
198 opponent.playerAssistant.restore();
199
201 player.send(new SendEntityHintArrow(opponent, true));
202
204 opponent.send(new SendEntityHintArrow(player, true));
205
206 if (winner == null || loser == null) {
207 player.message("The duel was a stalemate!");
208 opponent.message("The duel was a stalemate!");
209 reward(player, opponent, true);
210 rewarded = true;
212
213 playerPanel.close();
214 opponentPanel.close();
215 return;
216 }
217
218 winner.message("You are victorious!");
219 loser.message("You lost!");
220
221 reward(winner, loser, false);
222 rewarded = true;
224
225 playerPanel.close();
226 opponentPanel.close();
227
228 player.animate(Animation.RESET, true);
229 player.graphic(Graphic.RESET, true);
230
231 opponent.animate(Animation.RESET, true);
232 opponent.graphic(Graphic.RESET, true);
233 }
234
235 @Override
236 public void cleanup() {}
237
238 @Override
239 public void onDeath(Mob mob) {
240 hasLoser = true;
241
242 if (!session.accepted) {
243 player.exchangeSession.reset(ExchangeSessionType.DUEL);
244 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
246 return;
247 }
248
250 if (mob.equals(player)) {
252 loser = player;
253 } else if (mob.equals(opponent)) {
254 winner = player;
255 loser = opponent;
256 }
257 }
258
259 @Override
260 public void onLogout(Player player) {
261 if (!session.accepted) {
262 player.exchangeSession.reset(ExchangeSessionType.DUEL);
263 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
265 return;
266 }
267
269 if (player.equals(this.player)) {
271 loser = this.player;
272 } else if (player.equals(opponent)) {
273 winner = this.player;
274 loser = opponent;
275 }
276 }
277
278 @Override
279 public boolean canLogout(Player player) {
280 if (!session.accepted) {
281 player.exchangeSession.reset(ExchangeSessionType.DUEL);
282 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
284 return true;
285 }
286
287 player.send(new SendMessage("You cannot logout in the duel arena!"));
288 return false;
289 }
290
291 @Override
292 public boolean canDrinkPotions(Player player) {
293 if (!session.accepted) {
294 player.exchangeSession.reset(ExchangeSessionType.DUEL);
295 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
297 return true;
298 }
299
300 if (rules.contains(DuelRule.NO_DRINKS)) {
301 player.send(new SendMessage("Potions have been disabled!"));
302 return false;
303 }
304 return true;
305 }
306
307 @Override
308 public boolean canUsePrayer(Player player) {
309 if (!session.accepted) {
310 player.exchangeSession.reset(ExchangeSessionType.DUEL);
311 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
313 return true;
314 }
315
316 if (rules.contains(DuelRule.NO_PRAYER)) {
317 player.send(new SendMessage("Prayer has been disabled!"));
318 return false;
319 }
320
321 return true;
322 }
323
324 @Override
325 public boolean canEat(Player player, FoodData foodType) {
326 if (!session.accepted) {
327 player.exchangeSession.reset(ExchangeSessionType.DUEL);
328 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
330 return true;
331 }
332
333 if (rules.contains(DuelRule.NO_FOOD)) {
334 player.send(new SendMessage("Food has been disabled!"));
335 return false;
336 }
337 return true;
338 }
339
340 @Override
341 public boolean canUseSpecial(Player player) {
342 if (!session.accepted) {
343 player.exchangeSession.reset(ExchangeSessionType.DUEL);
344 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
346 return true;
347 }
348
349 if (rules.contains(DuelRule.NO_SPECIAL_ATTACK)) {
350 player.send(new SendMessage("Special attacks have been disabled!"));
351 return false;
352 }
353 return true;
354 }
355
356 @Override
357 public boolean canEquipItem(Player player, Item item, EquipmentType type) {
358 if (!session.accepted) {
359 player.exchangeSession.reset(ExchangeSessionType.DUEL);
360 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
362 return true;
363 }
364
365 if (type == null) {
366 return false;
367 }
368
369 if (rules.contains(DuelRule.LOCK_ITEMS)) {
370 player.send(new SendMessage("Item switching has been disabled!"));
371 return false;
372 }
373
374 if (rules.contains(DuelRule.ONLY_WHIP_DDS)) {
375 final String name = item.getName() == null ? "null" : item.getName().toLowerCase();
376 if (!name.contains("dragon dagger") && !name.contains("abyssal whip") && !name.contains("abyssal tentacle")) {
377 player.send(new SendMessage("You can only use a whip or dragon dagger!"));
378 return false;
379 }
380 }
381
382 if (rules.contains(DuelRule.ONLY_FUN_WEAPONS) && !DuelUtils.hasFunWeapon(player, item)) {
383 player.send(new SendMessage("You can only use fun weapons!"));
384 return false;
385 }
386
387 if (rules.contains(DuelRule.NO_WEAPON) && type.getSlot() == Equipment.WEAPON_SLOT) {
388 player.send(new SendMessage("Weapons have been disabled!"));
389 return false;
390 }
391
392 if (rules.contains(DuelRule.NO_SHIELD) && type.getSlot() == Equipment.SHIELD_SLOT) {
393 player.send(new SendMessage("Shields have been disabled!"));
394 return false;
395 }
396
397 if (rules.contains(DuelRule.NO_AMMO) && type.getSlot() == Equipment.ARROWS_SLOT) {
398 player.send(new SendMessage("Ammo has been disabled!"));
399 return false;
400 }
401
402 if (rules.contains(DuelRule.NO_HEAD) && type.getSlot() == Equipment.HEAD_SLOT) {
403 player.send(new SendMessage("Helms have been disabled!"));
404 return false;
405 }
406
407 if (rules.contains(DuelRule.NO_CAPE) && type.getSlot() == Equipment.CAPE_SLOT) {
408 player.send(new SendMessage("Capes have been disabled!"));
409 return false;
410 }
411
412 if (rules.contains(DuelRule.NO_NECKLACE) && type.getSlot() == Equipment.AMULET_SLOT) {
413 player.send(new SendMessage("Amulets hae been disabled!"));
414 return false;
415 }
416
417 if (rules.contains(DuelRule.NO_BODY) && type.getSlot() == Equipment.CHEST_SLOT) {
418 player.send(new SendMessage("Chest items have been disabled!"));
419 return false;
420 }
421
422 if (rules.contains(DuelRule.NO_LEGS) && type.getSlot() == Equipment.LEGS_SLOT) {
423 player.send(new SendMessage("Leg items have been disabled!"));
424 return false;
425 }
426
427 if (rules.contains(DuelRule.NO_GLOVES) && type.getSlot() == Equipment.HANDS_SLOT) {
428 player.send(new SendMessage("Gloves have been disabled!"));
429 return false;
430 }
431
432 if (rules.contains(DuelRule.NO_BOOTS) && type.getSlot() == Equipment.FEET_SLOT) {
433 player.send(new SendMessage("Boots have been disabled!"));
434 return false;
435 }
436
437 if (rules.contains(DuelRule.NO_RINGS) && type.getSlot() == Equipment.RING_SLOT) {
438 player.send(new SendMessage("Rings have been disabled!"));
439 return false;
440 }
441
442 return true;
443 }
444
445 private void unequipItems(Player player) {
446 if (!session.accepted) {
447 player.exchangeSession.reset(ExchangeSessionType.DUEL);
448 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
450 return;
451 }
452
453 if (rules.contains(DuelRule.NO_WEAPON) && player.equipment.hasWeapon()) {
454 player.equipment.unequip(Equipment.WEAPON_SLOT);
455 }
456
457 if (rules.contains(DuelRule.NO_HEAD) && player.equipment.hasHead()) {
458 player.equipment.unequip(Equipment.HEAD_SLOT);
459 }
460
461 if (rules.contains(DuelRule.NO_CAPE) && player.equipment.hasCape()) {
462 player.equipment.unequip(Equipment.CAPE_SLOT);
463 }
464
465 if (rules.contains(DuelRule.NO_NECKLACE) && player.equipment.hasAmulet()) {
466 player.equipment.unequip(Equipment.AMULET_SLOT);
467 }
468
469 if (rules.contains(DuelRule.NO_AMMO) && player.equipment.hasAmmo()) {
470 player.equipment.unequip(Equipment.ARROWS_SLOT);
471 }
472
473 if (rules.contains(DuelRule.NO_BODY) && player.equipment.hasChest()) {
474 player.equipment.unequip(Equipment.CHEST_SLOT);
475 }
476
477 if (rules.contains(DuelRule.NO_SHIELD)) {
478 if (player.equipment.hasWeapon()) {
479 Item weapon = player.equipment.getWeapon();
480 if (weapon.isTwoHanded()) {
481 player.equipment.unequip(Equipment.WEAPON_SLOT);
482 }
483 }
484
485 if (player.equipment.hasShield()) {
486 player.equipment.unequip(Equipment.SHIELD_SLOT);
487 }
488 }
489
490 if (rules.contains(DuelRule.NO_LEGS) && player.equipment.hasLegs()) {
491 player.equipment.unequip(Equipment.LEGS_SLOT);
492 }
493
494 if (rules.contains(DuelRule.NO_GLOVES) && player.equipment.hasHands()) {
495 player.equipment.unequip(Equipment.HANDS_SLOT);
496 }
497
498 if (rules.contains(DuelRule.NO_BOOTS) && player.equipment.hasFeet()) {
499 player.equipment.unequip(Equipment.FEET_SLOT);
500 }
501
502 if (rules.contains(DuelRule.NO_RINGS) && player.equipment.hasRing()) {
503 player.equipment.unequip(Equipment.RING_SLOT);
504 }
505
506 }
507
508 @Override
510 switch(event.getObject().getId()) {
511 case 3111:
512 case 3113:
513 case 3203:
514 if (!session.accepted) {
515 player.exchangeSession.reset(ExchangeSessionType.DUEL);
516 opponent.exchangeSession.reset(ExchangeSessionType.DUEL);
518 return true;
519 }
520
521 if (rules.contains(DuelRule.NO_FORFEIT)) {
522 player.send(new SendMessage("Forfeiting has been disabled!"));
523 return true;
524 }
525
526 if (!started) {
527 player.send(new SendMessage("You can't forfeit yet!"));
528 return true;
529 }
530
532 if (player.equals(this.player)) {
534 loser = this.player;
535 } else if (player.equals(opponent)) {
536 winner = this.player;
537 loser = opponent;
538 }
539 return true;
540
541 }
542 return false;
543 }
544
545 @Override
546 protected Optional<DuelArenaListener> getListener() {
547 return Optional.of(listener);
548 }
549
550 @Override
553 }
554
555 @Override
557 return ActivityDeathType.SAFE;
558 }
559
560 private void reward(Player player, Player loser, Item[] reward, long value, boolean stalemate) {
561 player.send(new SendString("<col=E1981F>Total Value: " + Utility.formatDigits(value), 31709));
562 player.send(new SendString(loser.getName(), 31706));
563 player.send(new SendString(loser.skills.getCombatLevel(), 31707));
564 player.send(new SendItemOnInterface(31708, reward));
565 player.send(new SendString(stalemate ? "The duel was a stalemate!" : player.equals(loser) ? "You lost!" : "You are victorious!", 31705));
566 player.interfaceManager.open(31700, false);
567 }
568
569 private void reward(Player winner, Player loser, boolean stalemate) {
570 Objects.requireNonNull(winner);
571 Objects.requireNonNull(loser);
572
573 ItemContainer winnerContainer = session.item_containers.get(winner);
574 Objects.requireNonNull(winnerContainer);
575
576 ItemContainer loserContainer = session.item_containers.get(loser);
577 Objects.requireNonNull(loserContainer);
578
579 if (stalemate) {
580 reward(loser, loser, loserContainer.toArray(), loserContainer.containerValue(PriceType.VALUE), true);
581 reward(winner, loser, winnerContainer.toArray(), winnerContainer.containerValue(PriceType.VALUE), true);
582
583 winner.inventory.addOrDrop(winnerContainer.toArray());
584 loser.inventory.addOrDrop(loserContainer.toArray());
585 } else {
586 long value = 0;
587
589
590 rewardContainer.addAll(loserContainer.toArray());
591 value += loserContainer.containerValue(PriceType.VALUE);
592 reward(loser, loser, rewardContainer.toArray(), value, false);
593
594 value += winnerContainer.containerValue(PriceType.VALUE);
595 rewardContainer.addAll(winnerContainer.toArray());
596 reward(winner, loser, rewardContainer.toArray(), value, false);
597
598 winner.inventory.addOrDrop(rewardContainer.toArray());
599 }
600 }
601
602 @Override
603 public void update() {
604 if (!started || getTicks() == FINISH || isPaused()) {
605 return;
606 }
607
608 playerPanel.update();
609 opponentPanel.update();
612 }
613
614 private static class DuelPanel extends Activity_Panel {
616 private final Player player;
617
619 super(player, "Duel Arena");
620 this.activity = activity;
621 this.player = player;
622 }
623
624 public void update() {
625 Player dueler = player.equals(activity.player) ? activity.player : activity.opponent;
626 Player duelee = !player.equals(activity.player) ? activity.player : activity.opponent;
627
628 if (!activity.started) {
629 set(0, "Dueling with: <col=FF5500>" + Utility.formatName(duelee.getName()) + "</col>");
630 setProgress(-1);
631 } else {
632 set(0, "Time remaining: <col=FF5500>" + Utility.getTime(activity.getTicks() / 2) + "</col>");
633 set(2, "Your accuracy: <col=FF5500>" + accuracy(dueler, duelee) + "</col>");
634 set(3, "Your max hit: <col=FF5500>" + dueler.playerAssistant.getMaxHit(duelee, dueler.getStrategy().getCombatType()) + "</col>");
635 set(5, "Opponent's accuracy: <col=FF5500>" + accuracy(duelee, dueler) + "</col>");
636 set(6, "Opponent's max hit: <col=FF5500>" + duelee.playerAssistant.getMaxHit(dueler, duelee.getStrategy().getCombatType()) + "</col>");
637 setFooter("Opponent health:");
639 }
640 setItem(new Item(4049));
641 }
642
643 private String accuracy(Player dueler, Player duelee) {
645 CombatType type = strategy.getCombatType();
646
647 dueler.getCombat().addModifier(strategy);
648 double attackRoll = rollOffensive(dueler, duelee, type.getFormula());
649 double defenceRoll = rollDefensive(dueler, duelee, type.getFormula()); //what is this exactly? this class duel arena? just a panel
650 dueler.getCombat().removeModifier(strategy);
651
652 double chance = attackRoll / (attackRoll + defenceRoll);
653 double accuracy = (int) (chance * 10000) / 100.0;
654 return String.valueOf(accuracy) + "%";
655 }
656
657 }
658
659}
final int cooldown
The sequencing cooldown.
Definition Activity.java:43
Activity(int cooldown, int instance)
Constructs a new SequencedMinigame object.
Definition Activity.java:55
final boolean isPaused()
Checks if the cooldown is paused.
static final int FINISH
The 'finish' cooldown id.
Definition Activity.java:37
int getTicks()
Gets the current ticks.
final void pause()
Sets the cooldown flag to PAUSE.
void removeAll(Mob... mobs)
Removes all mobs from the activity.
void add(Mob mob)
Adds a mob to the activity.
final void finishCooldown()
Sets the cooldown flag to FINISH.
static final Position HOSPITAL_BEDS_SOUTHWEST
The south-west tile of the hospital bed area.
final StakeSession session
The duel stake session (holds items).
static DuelArenaActivity create(StakeSession session, Player player, Player opponent)
static final Position[] OBSTACLE_ARENAS
The mid-points of all three obstacle duel arenas.
boolean rewarded
Whether or not the reward has been given.
boolean clickObject(Player player, ObjectInteractionEvent event)
final DuelArenaListener listener
The combat listener for the duel.
DuelArenaActivity(StakeSession session, Player player, Player opponent)
static final Position[] ARENAS
The mid-points of all three duel arenas.
final DuelRules rules
The duel rules for this duel session.
Optional< DuelArenaListener > getListener()
Gets an Optional of the ActivityListener for this activity.
void reward(Player winner, Player loser, boolean stalemate)
void reward(Player player, Player loser, Item[] reward, long value, boolean stalemate)
boolean canEquipItem(Player player, Item item, EquipmentType type)
void onLogout(Player player)
Called when the player logs out.
static boolean hasFunWeapon(Player player, Item item)
static void update(Player player, int amount, String title, String footer, String... strings)
Sends all the information for the activity panel.
Class that models a single animation used by an entity.
static final Animation RESET
Represents a single graphic that can be used by entities.
Definition Graphic.java:10
static final Graphic RESET
Definition Graphic.java:17
Represents a character in the game world, i.e.
Definition Entity.java:13
abstract boolean equals(Object obj)
Handles the mob class.
Definition Mob.java:66
int getMaxHit(Mob defender, CombatType type)
Gets the max hit of a combat type.
This class represents a character controlled by a player.
Definition Player.java:125
CombatStrategy< Player > getStrategy()
The combat strategy of the mob.
Definition Player.java:764
String getName()
Gets the name of this entity.
Definition Player.java:774
Combat< Player > getCombat()
The combat of the mob.
Definition Player.java:759
The exchange session where two players can agree to a stake.
The container class that represents an item that can be interacted with.
Definition Item.java:21
An abstraction game representing a group of Items.
boolean addAll(Collection<? extends Item > items)
Attempts to deposit items in bulk into this container.
long containerValue(PriceType type)
Gets the total worth of the container using the item's values.
final Item[] toArray()
Returns a shallow copy of the backing array.
The container that manages the equipment for a player.
static final int HEAD_SLOT
Equipment slot constants.
Contains traversal data for a set of regions.
static Position getRandomTraversableTile(Position southWest, int width, int length)
static Position getRandomNonDiagonal(Position from)
Represents a single tile on the game world.
Definition Position.java:14
The OutgoingPacket that sends a message to a Players chatbox in the client.
The OutgoingPacket that sends a string to a Players itemcontainer in the client.
Handles miscellaneous methods.
Definition Utility.java:27
static String formatName(final String input)
Definition Utility.java:645
static String formatDigits(final int amount)
Formats digits for integers.
Definition Utility.java:41
static double getPercentageAmount(int progress, int total)
Gets a percentage amount.
Definition Utility.java:36
static String getTime()
Gets the current server time and formats it.
Definition Utility.java:141
Holds all activity types that are timed.
An enumerated type defining policies for stackable Items.
STANDARD
The STANDARD policy, items are only stacked if they are defined as stackable in their ItemDefinition ...
The enumerated types of a players equipped item slots.