RuneHive-Game
Loading...
Searching...
No Matches
Preset.java
Go to the documentation of this file.
1package com.runehive.content.preset;
2
3import com.runehive.content.skill.impl.magic.Spellbook;
4import com.runehive.game.world.entity.mob.prayer.PrayerBook;
5import com.runehive.game.world.items.Item;
6
7/**
8 * The preset class.
9 *
10 * @author Daniel
11 */
12public class Preset {
13
14 /** The name of the preset. */
15 private String name;
16
17 /** The inventory items of the preset. */
18 private final Item[] inventory;
19
20 /** The equipment items of the preset. */
21 private final Item[] equipment;
22
23 /** The quick-prayers of the preset. */
24 private final PrayerBook prayer;
25
26 /** The spellbook of the preset. */
27 private final Spellbook spellbook;
28
29 /**
30 * Constructs a new preset.
31 *
32 * @param name
33 * The name of the preset.
34 * @param inventory
35 * The inventory of the preset.
36 * @param equipment
37 * The equipment of the preset.
38 * @param prayer
39 * The quick-prayers of the preset.
40 * @param spellbook
41 * The spellbook of the preset.
42 */
44 this.name = name;
45 this.inventory = inventory;
46 this.equipment = equipment;
47 this.prayer = prayer;
48 this.spellbook = spellbook;
49 }
50
51 /**
52 * Constructs a new preset.
53 *
54 * @param name
55 * The name of the preset.
56 */
57 public Preset(String name) {
58 this(name, new Item[28], new Item[14], new PrayerBook(), Spellbook.MODERN);
59 }
60
61 /**
62 * Constructs a new preset.
63 */
64 public Preset() {
65 this(null, new Item[28], new Item[14], new PrayerBook(), Spellbook.MODERN);
66 }
67
68
69 /**
70 * Gets the name of the preset.
71 *
72 * @return The preset name.
73 */
74 public String getName() {
75 return name;
76 }
77
78 /**
79 * Gets the inventory of the preset.
80 *
81 * @return The preset inventory.
82 */
83 public Item[] getInventory() {
84 return inventory;
85 }
86
87 public Item[] getEquipment() {
88 return equipment;
89 }
90
92 return prayer;
93 }
94
96 return spellbook;
97 }
98
99 public void setName(String name) {
100 this.name = name;
101 }
102}
Item[] getInventory()
Gets the inventory of the preset.
Definition Preset.java:83
Preset(String name)
Constructs a new preset.
Definition Preset.java:57
Preset()
Constructs a new preset.
Definition Preset.java:64
final Item[] inventory
The inventory items of the preset.
Definition Preset.java:18
final Spellbook spellbook
The spellbook of the preset.
Definition Preset.java:27
Preset(String name, Item[] inventory, Item[] equipment, PrayerBook prayer, Spellbook spellbook)
Constructs a new preset.
Definition Preset.java:43
String name
The name of the preset.
Definition Preset.java:15
final Item[] equipment
The equipment items of the preset.
Definition Preset.java:21
final PrayerBook prayer
The quick-prayers of the preset.
Definition Preset.java:24
String getName()
Gets the name of the preset.
Definition Preset.java:74
The container class that represents an item that can be interacted with.
Definition Item.java:21
The in-game spellbooks for players.
Definition Spellbook.java:8