RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.mysterybox.MysteryBox Class Referenceabstract

The mystery box class. More...

Inheritance diagram for com.runehive.content.mysterybox.MysteryBox:

Static Public Member Functions

static void load ()
 Handles loading the mystery boxes.

Protected Member Functions

abstract int item ()
 The item identification of the mystery box.
abstract String name ()
 The name of the mystery box.
abstract MysteryItem[] rewards ()
 The rewards for the mystery box.

Static Package Functions

static Optional< MysteryBoxgetMysteryBox (int item)
 Handles getting the mystery box.

Static Private Attributes

static Map< Integer, MysteryBoxMYSTERY_BOXES = new HashMap<>()
 The map containing all the mystery boxes.

Detailed Description

The mystery box class.

Author
Daniel

Definition at line 17 of file MysteryBox.java.

Member Function Documentation

◆ getMysteryBox()

Optional< MysteryBox > com.runehive.content.mysterybox.MysteryBox.getMysteryBox ( int item)
staticpackage

Handles getting the mystery box.

Definition at line 36 of file MysteryBox.java.

36 {
37 return MYSTERY_BOXES.containsKey(item) ? Optional.of(MYSTERY_BOXES.get(item)) : Optional.empty();
38 }

References item(), and MYSTERY_BOXES.

Referenced by com.runehive.content.mysterybox.MysteryBoxManager.click().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ item()

abstract int com.runehive.content.mysterybox.MysteryBox.item ( )
abstractprotected

The item identification of the mystery box.

Reimplemented in com.runehive.content.mysterybox.impl.BronzeMysteryBox, com.runehive.content.mysterybox.impl.GoldMysteryBox, com.runehive.content.mysterybox.impl.PetMysteryBox, and com.runehive.content.mysterybox.impl.SilverMysteryBox.

Referenced by getMysteryBox(), and load().

Here is the caller graph for this function:

◆ load()

void com.runehive.content.mysterybox.MysteryBox.load ( )
static

Handles loading the mystery boxes.

Definition at line 23 of file MysteryBox.java.

23 {
24 MysteryBox BRONZE_BOX = new BronzeMysteryBox();
25 MysteryBox SILVER_BOX = new SilverMysteryBox();
26 MysteryBox GOLD_BOX = new GoldMysteryBox();
27 MysteryBox PET_BOX = new PetMysteryBox();
28
29 MYSTERY_BOXES.put(BRONZE_BOX.item(), BRONZE_BOX);
30 MYSTERY_BOXES.put(SILVER_BOX.item(), SILVER_BOX);
31 MYSTERY_BOXES.put(GOLD_BOX.item(), GOLD_BOX);
32 MYSTERY_BOXES.put(PET_BOX.item(), PET_BOX);
33 }

References item(), and MYSTERY_BOXES.

Referenced by com.runehive.RuneHive.processParallelStartupTasks().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

abstract String com.runehive.content.mysterybox.MysteryBox.name ( )
abstractprotected

◆ rewards()

abstract MysteryItem[] com.runehive.content.mysterybox.MysteryBox.rewards ( )
abstractprotected

Member Data Documentation

◆ MYSTERY_BOXES

Map<Integer, MysteryBox> com.runehive.content.mysterybox.MysteryBox.MYSTERY_BOXES = new HashMap<>()
staticprivate

The map containing all the mystery boxes.

Definition at line 20 of file MysteryBox.java.

Referenced by getMysteryBox(), and load().


The documentation for this class was generated from the following file: