Package de.marcely.bedwars.api.game.shop
Enum ShopOpenCause
- All Implemented Interfaces:
Serializable
,Comparable<ShopOpenCause>
,java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPlayer potentially didn't actually open the shop, he just bought a ShopItem via the API.Player changed the pageThe shop was opened using a commandPlayer clicked on a dealer that has been spawned with /bw summon dealerPlayer clicked on a dealer that has been spawned withSpecialItemType.MINI_SHOP
A plugin opened the GUIPage has been refreshed (After a purchase)Player clicked on a normal villager hologram -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get whether the player opened the shop for the first time and not by e.g. changing the page.static ShopOpenCause
Returns the enum constant of this type with the specified name.static ShopOpenCause[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEALER
Player clicked on a dealer that has been spawned with /bw summon dealer -
MINI_SHOP
Player clicked on a dealer that has been spawned withSpecialItemType.MINI_SHOP
-
VILLAGER
Player clicked on a normal villager hologram -
CHANGE_PAGE
Player changed the page -
REFRESH
Page has been refreshed (After a purchase) -
COMMAND
The shop was opened using a command -
API_ITEM_BUY
Player potentially didn't actually open the shop, he just bought a ShopItem via the API.Exists due to
PlayerBuyInShopEvent.getOpenCause()
andShopItem.buy(Player, boolean)
. -
PLUGIN
A plugin opened the GUI
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isInitial
public boolean isInitial()Get whether the player opened the shop for the first time and not by e.g. changing the page.- Returns:
true
if the player opened the shop for the first time
-