RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.activity.lobby.LobbyNode Class Referenceabstract
Inheritance diagram for com.runehive.content.activity.lobby.LobbyNode:
Collaboration diagram for com.runehive.content.activity.lobby.LobbyNode:

Public Member Functions

boolean inLobby ()
Public Member Functions inherited from com.runehive.content.activity.GroupActivity
final void addActivity (Mob mob, Activity activity)
 Adds an activity to the activities group.
void cleanup ()
 Cleans up the activity when finished.
void finish ()
 Finishes the activity.
void forEachActivity (BiConsumer< Mob, Activity > activity)
 Loops through all the activities.
int getActiveSize ()
 Gets the size of the activities in this group.
Activity getActivity (Mob mob)
final void groupMessage (String message)
 Sends a message to all the players in the group.
final boolean isActive ()
 Checks if this group is active.
final void removeActivity (Mob mob)
 Removes an activity from the activities group.
Public Member Functions inherited from com.runehive.content.activity.Activity
 Activity (int cooldown, int instance)
 Constructs a new SequencedMinigame object.
void add (Mob mob)
 Adds a mob to the activity.
boolean canDrinkPotions (Player player)
boolean canEat (Player player, FoodData foodType)
boolean canEquipItem (Player player, Item item, EquipmentType type)
boolean canLogout (Player player)
boolean canSpellCast (Player player)
boolean canTeleport (Player player)
 Called when the player attempts to teleport.
boolean canUsePrayer (Player player)
boolean canUseSpecial (Player player)
void cooldown (int cooldown)
 Applies a cooldown.
ActivityDeathType deathType ()
int getInstance ()
 Gets this activity's instance level.
Optional< Activity_PanelgetPanel ()
 Gets an optional of the activity panel.
int getTicks ()
 Gets the current ticks.
abstract ActivityType getType ()
void onDeath (Mob mob)
 Called when the player die.
boolean onEvent (Player player, InteractionEvent interactionEvent)
void onLogout (Player player)
 Called when the player logs out.
void onRegionChange (Player player)
 Called when the player changes region.
boolean onStep (Mob mob)
void remove (Mob mob)
 Removes a mob from the activity.
void removeAll (Mob... mobs)
 Removes all mobs from the activity.
void sequence ()
 Sequences the activity.
void setInstance (int instance)
void setPanel (Activity_Panel panel)
 Sets the activity panel.
void setPause (boolean pause)
 Sets the pause state of the activity.
void update ()
 The update method.

Protected Member Functions

boolean contains (Player player)
abstract Activity createActivity (Player player)
boolean finished ()
 LobbyNode (LobbyManager manager)
void onStart ()
final void start ()
 Starts the next activity stage.
Protected Member Functions inherited from com.runehive.content.activity.GroupActivity
 GroupActivity (int cooldown, int capacity)
 Constructs a new GroupActivity object.
void removeAll ()
Protected Member Functions inherited from com.runehive.content.activity.Activity
boolean clickButton (Player player, ClickButtonInteractionEvent event)
boolean clickItem (Player player, ItemInteractionEvent event)
boolean clickNpc (Player player, NpcInteractionEvent event)
boolean clickObject (Player player, ObjectInteractionEvent event)
final void finishCooldown ()
 Sets the cooldown flag to FINISH.
Optional<? extends ActivityListener<? extends Activity > > getListener ()
 Gets an Optional of the ActivityListener for this activity.
final boolean isPaused ()
 Checks if the cooldown is paused.
boolean itemContainerAction (Player player, ItemContainerInteractionEvent event)
final void pause ()
 Sets the cooldown flag to PAUSE.
boolean pickupItem (Player player, PickupItemInteractionEvent event)
final void resetCooldown ()
 Resets the remaining ticks to the cached cooldown ticks.
void restart (int delay, Runnable runnable)
boolean useItem (Player player, ItemOnItemInteractionEvent event)
boolean useItem (Player player, ItemOnObjectInteractionEvent event)

Protected Attributes

final LobbyManager manager
Protected Attributes inherited from com.runehive.content.activity.GroupActivity
final Map< Mob, Activityactivities
 A map of activities that handles each mob individually.

Package Attributes

boolean lobby

Additional Inherited Members

Static Public Member Functions inherited from com.runehive.content.activity.Activity
static boolean evaluate (Mob mob, Predicate< Activity > predicate)
static void forActivity (Mob mob, Consumer< Activity > consumer)
static< T extends Activity > Optional< T > search (Player player, Class< T > clazz)
Static Protected Attributes inherited from com.runehive.content.activity.Activity
static final int FINISH = -1
 The 'finish' cooldown id.
static final int PAUSE = -2
 The 'pause' cooldown id.
static final int START = 0
 The 'start' cooldown id.

Detailed Description

Definition at line 7 of file LobbyNode.java.

Constructor & Destructor Documentation

◆ LobbyNode()

com.runehive.content.activity.lobby.LobbyNode.LobbyNode ( LobbyManager manager)
protected

Definition at line 11 of file LobbyNode.java.

11 {
12 super(manager.getLobbyCooldown(), manager.getPlayerCapacity());
13 this.manager = manager;
14 }

References manager.

Member Function Documentation

◆ contains()

boolean com.runehive.content.activity.lobby.LobbyNode.contains ( Player player)
protected

Definition at line 36 of file LobbyNode.java.

36 {
37 return activities.containsKey(player);
38 }

References com.runehive.content.activity.GroupActivity.activities.

◆ createActivity()

abstract Activity com.runehive.content.activity.lobby.LobbyNode.createActivity ( Player player)
abstractprotected

◆ finished()

boolean com.runehive.content.activity.lobby.LobbyNode.finished ( )
protected

Reimplemented in com.runehive.content.activity.impl.pestcontrol.PestControlGame.

Definition at line 32 of file LobbyNode.java.

32 {
33 return getTicks() == FINISH || getActiveSize() == 0;
34 }

References com.runehive.content.activity.Activity.FINISH, com.runehive.content.activity.GroupActivity.getActiveSize(), and com.runehive.content.activity.Activity.getTicks().

Referenced by com.runehive.content.activity.lobby.LobbyManager.sequenceActive().

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

◆ inLobby()

boolean com.runehive.content.activity.lobby.LobbyNode.inLobby ( )

Definition at line 40 of file LobbyNode.java.

40 {
41 return lobby;
42 }

References lobby.

Referenced by com.runehive.content.activity.impl.pestcontrol.PestControlGame.PestControlNode.finish(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.finished(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.sequence(), and com.runehive.content.activity.impl.pestcontrol.PestControlGame.PestControlPanel.update().

Here is the caller graph for this function:

◆ onStart()

void com.runehive.content.activity.lobby.LobbyNode.onStart ( )
protected

Reimplemented in com.runehive.content.activity.impl.pestcontrol.PestControlGame.

Definition at line 26 of file LobbyNode.java.

26 {
27 /* do nothing by default */
28 }

Referenced by start().

Here is the caller graph for this function:

◆ start()

final void com.runehive.content.activity.lobby.LobbyNode.start ( )
protected

Starts the next activity stage.

Reimplemented from com.runehive.content.activity.GroupActivity.

Definition at line 17 of file LobbyNode.java.

17 {
18 if (manager.canStart(this)) {
19 super.start();
20 onStart();
21 lobby = false;
22 cooldown(manager.getGameCooldown());
23 }
24 }

References com.runehive.content.activity.Activity.cooldown, lobby, manager, and onStart().

Here is the call graph for this function:

Member Data Documentation

◆ lobby

boolean com.runehive.content.activity.lobby.LobbyNode.lobby
package

◆ manager


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