RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
com.osroyale.content.consume.PotionData Enum Reference

Classes

enum  BoostType

Public Member Functions

 PotionData (int... ids)
abstract void onEffect (Player player)
boolean canDrink (Player player)
final int[] getIds ()
int getIdForDose (int dose)

Static Public Member Functions

static void onAntiPoisonEffect (Player player, boolean superPotion, int length)
static Item getReplacementItem (Item item)
static Optional< PotionDataforId (int id)

Detailed Description

The enumerated type managing consumable potion types.

Author
Ryley Kimmel ryley.nosp@m..kim.nosp@m.mel@l.nosp@m.ive..nosp@m.com
lare96 http://github.com/lare96

Definition at line 50 of file PotionData.java.

Constructor & Destructor Documentation

◆ PotionData()

com.osroyale.content.consume.PotionData.PotionData ( int... ids)
inline

Create a new PotionData.

Parameters
idsthe identifiers which represent this potion type.

Definition at line 280 of file PotionData.java.

Member Function Documentation

◆ canDrink()

boolean com.osroyale.content.consume.PotionData.canDrink ( Player player)
inline

The method which determines if the player can drink the potion.

Parameters
playerthe player to determine this for.

Definition at line 526 of file PotionData.java.

◆ forId()

Optional< PotionData > com.osroyale.content.consume.PotionData.forId ( int id)
inlinestatic

Retrieves the potion consumable element for id.

Parameters
idthe id that the potion consumable is attached to.
Returns
the potion consumable wrapped in an optional, or an empty optional if no potion consumable was found.

Definition at line 503 of file PotionData.java.

◆ getIdForDose()

int com.osroyale.content.consume.PotionData.getIdForDose ( int dose)
inline

Gets the item id for the specified dose.

Parameters
dosethe dose to get the item id from.
Returns
the item id.

Definition at line 545 of file PotionData.java.

◆ getIds()

final int[] com.osroyale.content.consume.PotionData.getIds ( )
inline

Gets the identifiers which represent this potion type.

Returns
the identifiers for this potion.

Definition at line 535 of file PotionData.java.

◆ getReplacementItem()

Item com.osroyale.content.consume.PotionData.getReplacementItem ( Item item)
inlinestatic

Retrieves the replacement item for item.

Parameters
itemthe item to retrieve the replacement item for.
Returns
the replacement item wrapped in an optional, or an empty optional if no replacement item is available.

Definition at line 483 of file PotionData.java.

◆ onAntiPoisonEffect()

void com.osroyale.content.consume.PotionData.onAntiPoisonEffect ( Player player,
boolean superPotion,
int length )
inlinestatic

The method that executes the anti-poison potion action.

Parameters
playerthe player to do this action for.
superPotiontrue if this potion is a super potion,
false
otherwise.
lengththe length that the effect lingers for.

Definition at line 352 of file PotionData.java.

◆ onEffect()

abstract void com.osroyale.content.consume.PotionData.onEffect ( Player player)
abstract

The method executed when this potion type activated.

Parameters
playerthe player to execute this effect for.

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