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

public class PlayerShopProductGivingDetermineEvent extends PlayerEvent implements ArenaEvent
Called when the items that a player shall receive from a shop product are determined.
See Also:
  • Constructor Details

  • Method Details

    • getTeam

      @Nullable public @Nullable Team 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

      @Nullable public @Nullable Arena getArena()
      Get the arena the player is in.
      Specified by:
      getArena in interface ArenaEvent
      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

      public ShopProduct getShopProduct()
      Get the shop product that the player is trying to buy.
      Returns:
      The shop product involved in this event.
    • getGivingItems

      public ItemStack[] 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

      public void setGivingItems(ItemStack[] givingItems)
      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

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()