Class PlayerShopProductGivingDetermineEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerShopProductGivingDetermineEvent
- All Implemented Interfaces:
ArenaEvent
Called when the items that a player shall receive from a shop product are determined.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents that may be executed in the future.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
ConstructorDescriptionPlayerShopProductGivingDetermineEvent
(Player player, @Nullable Team team, @Nullable Arena arena, int multiplier, ShopProduct product, ItemStack[] givingItems, PlayerShopProductGivingDetermineEvent.ExecutableCommand[] executingCommands) -
Method Summary
Modifier and TypeMethodDescription@Nullable Arena
getArena()
Get the arena the player is in.Get the commands that shall be executed.Get the items that the player shall receive.static HandlerList
int
Get the multiplier of the shop product.Get the shop product that the player is trying to buy.@Nullable Team
getTeam()
Get the team the player is in.void
setExecutingCommands
(PlayerShopProductGivingDetermineEvent.ExecutableCommand[] executingCommands) Set the commands that shall be executed.void
setGivingItems
(ItemStack[] givingItems) Set the items that the player shall receive.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerShopProductGivingDetermineEvent
public PlayerShopProductGivingDetermineEvent(Player player, @Nullable @Nullable Team team, @Nullable @Nullable Arena arena, int multiplier, ShopProduct product, ItemStack[] givingItems, PlayerShopProductGivingDetermineEvent.ExecutableCommand[] executingCommands)
-
-
Method Details
-
getTeam
Get the team the player is in.- Returns:
- The team the player is in. May be
null
if the player is not in a team.
-
getArena
Get the arena the player is in.- Specified by:
getArena
in interfaceArenaEvent
- Returns:
- The arena the player is in. May be
null
if the player is not in an arena.
-
getMultiplier
public int getMultiplier()Get the multiplier of the shop product.- Returns:
- How many times this product shall be given to the player. Should be at least 1, or otherwise no effect will be seen.
-
getShopProduct
Get the shop product that the player is trying to buy.- Returns:
- The shop product involved in this event.
-
getGivingItems
Get the items that the player shall receive.The multiplier is already applied to the items.
- Returns:
- The items that the player shall receive.
-
setGivingItems
Set the items that the player shall receive.The multiplier is already applied to the items.
- Parameters:
givingItems
- The items that the player shall receive.
-
getExecutingCommands
Get the commands that shall be executed.- Returns:
- The commands that shall be executed.
-
setExecutingCommands
public void setExecutingCommands(PlayerShopProductGivingDetermineEvent.ExecutableCommand[] executingCommands) Set the commands that shall be executed.- Parameters:
executingCommands
- The commands that shall be executed.
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-