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.
- See Also:
-
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, @Nullable CustomDropTypeHandler callingDropTypeHandler) -
Method Summary
Modifier and TypeMethodDescription@Nullable Arena
getArena()
Get the arena the player is in.@Nullable CustomDropTypeHandler
Get the custom drop type handlers that shall be called.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
setCallingDropTypeHandler
(@Nullable CustomDropTypeHandler callingDropTypeHandler) Set the custom drop type handlers that shall be called.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, @Nullable @Nullable CustomDropTypeHandler callingDropTypeHandler)
-
-
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.
-
getCallingDropTypeHandler
Get the custom drop type handlers that shall be called.- Returns:
- The custom drop type handlers that shall be called. May be
null
if none shall be called
-
setCallingDropTypeHandler
public void setCallingDropTypeHandler(@Nullable @Nullable CustomDropTypeHandler callingDropTypeHandler) Set the custom drop type handlers that shall be called.- Parameters:
callingDropTypeHandler
- The custom drop type handlers that shall be called. May benull
if none shall be called
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-