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
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents 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
ConstructorsConstructorDescriptionPlayerShopProductGivingDetermineEvent(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 ArenagetArena()Get the arena the player is in.@Nullable CustomDropTypeHandlerGet 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 HandlerListintGet the multiplier of the shop product.Get the shop product that the player is trying to buy.@Nullable TeamgetTeam()Get the team the player is in.voidsetCallingDropTypeHandler(@Nullable CustomDropTypeHandler callingDropTypeHandler) Set the custom drop type handlers that shall be called.voidsetExecutingCommands(PlayerShopProductGivingDetermineEvent.ExecutableCommand[] executingCommands) Set the commands that shall be executed.voidsetGivingItems(ItemStack[] givingItems) Set the items that the player shall receive.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods 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
nullif the player is not in a team.
-
getArena
Get the arena the player is in.- Specified by:
getArenain interfaceArenaEvent- Returns:
- The arena the player is in. May be
nullif 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
nullif 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 benullif none shall be called
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-