Class PlayerOpenUpgradeShopEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerOpenUpgradeShopEvent
- All Implemented Interfaces:
ArenaEvent
,Cancellable
Gets called when the player is opening the upgrade shop
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerOpenUpgradeShopEvent
(Player player, @Nullable Arena arena, Team team, UpgradeShopLayout layout, UpgradeShopOpenCause cause, @Nullable Object layoutData) -
Method Summary
Modifier and TypeMethodDescription@Nullable Arena
getArena()
Returns the arena in which the shop was opened.getCause()
Returns the way how the player opened the upgrade shopstatic HandlerList
Returns the layout that will be used for the GUI.@Nullable Object
A layout may hold and pass around data during its session.getTeam()
Returns the arena in which the shop was opened.void
setLayout
(UpgradeShopLayout layout) Set the layout of the shop GUI that shall be shown.void
setLayoutData
(@Nullable Object layoutData) A layout may hold and pass around data during its session.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bukkit.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
PlayerOpenUpgradeShopEvent
public PlayerOpenUpgradeShopEvent(Player player, @Nullable @Nullable Arena arena, Team team, UpgradeShopLayout layout, UpgradeShopOpenCause cause, @Nullable @Nullable Object layoutData)
-
-
Method Details
-
getArena
Returns the arena in which the shop was opened.It's equal to the arena in which the player is playing.
- Specified by:
getArena
in interfaceArenaEvent
- Returns:
- The arena in which the upgrade shop was opened
-
getTeam
Returns the arena in which the shop was opened.The team that the player is trying to buy upgrades for
- Returns:
- The team for which the upgrade shop was opened
-
getLayout
Returns the layout that will be used for the GUI.- Returns:
- The layout that shall be shown
-
setLayout
Set the layout of the shop GUI that shall be shown.- Parameters:
layout
- The layout that shall be shown to the player
-
getLayoutData
A layout may hold and pass around data during its session.This might be useful when you're trying to manipulate the layout.
- Returns:
- The layout specific data
-
setLayoutData
A layout may hold and pass around data during its session.This might be useful when you're trying to manipulate the layout. Keep in mind that errors might occur with the layout when inserting unexpected data.
- Parameters:
layoutData
- The new layout data
-
getCause
Returns the way how the player opened the upgrade shop- Returns:
- The cause of the opening
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-