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.
◆ PotionData()
com.osroyale.content.consume.PotionData.PotionData |
( |
int... | ids | ) |
|
|
inline |
◆ canDrink()
boolean com.osroyale.content.consume.PotionData.canDrink |
( |
Player | player | ) |
|
|
inline |
The method which determines if the player
can drink the potion.
- Parameters
-
player | the 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
-
id | the 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
-
dose | the 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
-
item | the 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
-
player | the player to do this action for. |
superPotion | true if this potion is a super potion,
false otherwise. |
length | the 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
-
player | the player to execute this effect for. |
The documentation for this enum was generated from the following file: