RuneHive-Game
Loading...
Searching...
No Matches
GenieLamp.java
Go to the documentation of this file.
1package com.runehive.content;
2
3import com.runehive.game.world.entity.skill.Skill;
4
5import java.util.Arrays;
6import java.util.Optional;
7
8/**
9 * Class that handles genie lamp
10 *
11 * @author Daniel
12 */
13public enum GenieLamp {
21
29
37
40
41 private final int buttonId;
42 private final int skillId;
43
45 this.buttonId = buttonId;
46 this.skillId = skillId;
47 }
48
49 public int getButton() {
50 return buttonId;
51 }
52
53 public int getSkill() {
54 return skillId;
55 }
56
57 public static Optional<GenieLamp> forButton(int button) {
58 return Arrays.stream(values()).filter(lamp -> lamp.buttonId == button).findFirst();
59 }
60}
61
Represents a trainable and usable skill.
Definition Skill.java:18
static final int SLAYER
The slayer skill id.
Definition Skill.java:75
static final int WOODCUTTING
The woodcutting skill id.
Definition Skill.java:45
static final int PRAYER
The prayer skill id.
Definition Skill.java:36
static final int RANGED
The ranged skill id.
Definition Skill.java:33
static final int CRAFTING
The crafting skill id.
Definition Skill.java:57
static final int HERBLORE
The herblore skill id.
Definition Skill.java:66
static final int SMITHING
The smithing skill id.
Definition Skill.java:60
static final int FISHING
The fishing skill id.
Definition Skill.java:51
static final int DEFENCE
The defence skill id.
Definition Skill.java:24
static final int CONSTRUCTION
The construction skill id.
Definition Skill.java:84
static final int FLETCHING
The fletching skill id.
Definition Skill.java:48
static final int FIREMAKING
The firemaking skill id.
Definition Skill.java:54
static final int MAGIC
The magic skill id.
Definition Skill.java:39
static final int ATTACK
The attack skill id.
Definition Skill.java:21
static final int FARMING
The farming skill id.
Definition Skill.java:78
static final int AGILITY
The agility skill id.
Definition Skill.java:69
static final int THIEVING
The thieving skill id.
Definition Skill.java:72
static final int HUNTER
The hunter skill id.
Definition Skill.java:87
static final int STRENGTH
The strength skill id.
Definition Skill.java:27
static final int COOKING
The cooking skill id.
Definition Skill.java:42
static final int MINING
The mining skill id.
Definition Skill.java:63
static final int HITPOINTS
The hitpoints skill id.
Definition Skill.java:30
static final int RUNECRAFTING
The runecrafting skill id.
Definition Skill.java:81
static Optional< GenieLamp > forButton(int button)
GenieLamp(int buttonId, int skillId)