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

public class PlayerOpenUpgradeShopEvent extends PlayerEvent implements ArenaEvent, Cancellable
Gets called when the player is opening the upgrade shop
  • Constructor Details

  • Method Details

    • getArena

      @Nullable public @Nullable Arena 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 interface ArenaEvent
      Returns:
      The arena in which the upgrade shop was opened
    • getTeam

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

      public UpgradeShopLayout getLayout()
      Returns the layout that will be used for the GUI.
      Returns:
      The layout that shall be shown
    • setLayout

      public void setLayout(UpgradeShopLayout layout)
      Set the layout of the shop GUI that shall be shown.
      Parameters:
      layout - The layout that shall be shown to the player
    • getLayoutData

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

      public void setLayoutData(@Nullable @Nullable Object layoutData)
      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

      public UpgradeShopOpenCause getCause()
      Returns the way how the player opened the upgrade shop
      Returns:
      The cause of the opening
    • getHandlers

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

      public static HandlerList getHandlerList()