RuneHive-Game
Loading...
Searching...
No Matches
ClanReward.java
Go to the documentation of this file.
1package com.runehive.content.clanchannel.content;
2
3import java.util.Optional;
4
5/**
6 * Holds all the clan reward data.
7 *
8 * @author Daniel
9 */
10public enum ClanReward {
11 DOUBLE_SKILL_EXPERIENCE_1HOUR("Double skill experience (1hr)", 11188, 60, -1, -1);
12
13 /** The name of the reward. */
14 public final String name;
15
16 /** The item identification of the reward. */
17 public final int item;
18
19 /** The duration of the reward. */
20 public final int duration;
21
22 /** The experience of the reward. */
23 public final int experience;
24
25 /** The drop modifier of the reward. */
26 public final double dropModifier;
27
28 /** Makes a new <code>ClanReward<code> */
29 ClanReward(String name, int item, int duration, int experience, double dropModifier) {
30 this.name = name;
31 this.item = item;
32 this.duration = duration;
33 this.experience = experience;
34 this.dropModifier = dropModifier;
35 }
36
37 /** Handles getting the clan reward based on the item identification. */
38 public static Optional<ClanReward> forId(int item) {
39 for (ClanReward reward : values())
40 if (reward.item == item)
41 return Optional.of(reward);
42 return Optional.empty();
43 }
44}
final double dropModifier
The drop modifier of the reward.
final int experience
The experience of the reward.
final int duration
The duration of the reward.
ClanReward(String name, int item, int duration, int experience, double dropModifier)
Makes a new ClanReward
final String name
The name of the reward.
final int item
The item identification of the reward.
static Optional< ClanReward > forId(int item)
Handles getting the clan reward based on the item identification.