Class PlayerTriggerUpgradeEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerTriggerUpgradeEvent
All Implemented Interfaces:
ArenaEvent, Cancellable

public class PlayerTriggerUpgradeEvent extends PlayerEvent implements ArenaEvent, Cancellable
  • Nested Class Summary

    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

    Constructors
    Constructor
    Description
    PlayerTriggerUpgradeEvent(Player player, Arena arena, Team team, UpgradeLevel upgradeLevel, boolean broadcastingMessage, boolean broadcastingTitle, boolean broadcastingSound, boolean takingFromQueue)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the amplifier that's being applied to this upgrade
    Returns the arena in which the trap was triggered.
    int
    Returns the duration that's being applied to this upgrade
     
     
    Returns the team in which the upgrade or trap belongs to.
    Returns the UpgradeLevel that belongs to the upgrade that's being triggered, or the trap that's being purchased
    boolean
    Whether or not a message will be sent out to all team players when an upgrade is purchased, or when a trap is triggered
    boolean
    Whether or not a sound will be played when an upgrade is purchased, or when a trap is triggered
    boolean
    Whether or not a title will be sent out to all team players when an upgrade is purchased, or when a trap is triggered
    boolean
     
    boolean
    If true the trap will be pulled from the upgrade queue.
    boolean
    Returns if the handler attached to this UpgradeLevel is a trap handler
    void
    setBroadcastingMessage(boolean broadcastingMessage)
    Sets whether or not a message will be sent out to all team players when an upgrade is purchased, or when a trap is triggered
    void
    setBroadcastingSound(boolean broadcastingSound)
    Set whether or not a sound should be played when an upgrade is purchased, or when a trap is triggered
    void
    setBroadcastingTitle(boolean broadcastingTitle)
    Sets whether or not a title will be sent out to all team players when an upgrade is purchased, or when a trap is triggered
    void
    setCancelled(boolean bool)
     
    void
    setTakingFromQueue(boolean takingFromQueue)
    If true the trap will be pulled from the upgrade queue.

    Methods inherited from class org.bukkit.event.player.PlayerEvent

    getPlayer

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayerTriggerUpgradeEvent

      public PlayerTriggerUpgradeEvent(Player player, Arena arena, Team team, UpgradeLevel upgradeLevel, boolean broadcastingMessage, boolean broadcastingTitle, boolean broadcastingSound, boolean takingFromQueue)
  • Method Details

    • getArena

      public Arena getArena()
      Returns the arena in which the trap was triggered.
      Specified by:
      getArena in interface ArenaEvent
      Returns:
      The arena involved
    • getTeam

      public Team getTeam()
      Returns the team in which the upgrade or trap belongs to.
      Returns:
      The team involved
    • isTakingFromQueue

      public boolean isTakingFromQueue()
      If true the trap will be pulled from the upgrade queue. This has no effect if this UpgradeLevel handler is not a trap
      Returns:
      weather or not a trap will be pulled from the team's trap queue
    • setTakingFromQueue

      public void setTakingFromQueue(boolean takingFromQueue)
      If true the trap will be pulled from the upgrade queue. This has no effect if this UpgradeLevel handler is not a trap
      Parameters:
      takingFromQueue - weather or not a trap will be pulled from the team's trap queue
    • isBroadcastingMessage

      public boolean isBroadcastingMessage()
      Whether or not a message will be sent out to all team players when an upgrade is purchased, or when a trap is triggered
      Returns:
      if a message will be broadcast
    • setBroadcastingMessage

      public void setBroadcastingMessage(boolean broadcastingMessage)
      Sets whether or not a message will be sent out to all team players when an upgrade is purchased, or when a trap is triggered
      Parameters:
      broadcastingMessage - if a message should be broadcast
    • isBroadcastingTitle

      public boolean isBroadcastingTitle()
      Whether or not a title will be sent out to all team players when an upgrade is purchased, or when a trap is triggered
      Returns:
      if a title will be sent
    • setBroadcastingTitle

      public void setBroadcastingTitle(boolean broadcastingTitle)
      Sets whether or not a title will be sent out to all team players when an upgrade is purchased, or when a trap is triggered
      Parameters:
      broadcastingTitle - if a message should be broadcast
    • isBroadcastingSound

      public boolean isBroadcastingSound()
      Whether or not a sound will be played when an upgrade is purchased, or when a trap is triggered
      Returns:
      if the sound is being played
    • setBroadcastingSound

      public void setBroadcastingSound(boolean broadcastingSound)
      Set whether or not a sound should be played when an upgrade is purchased, or when a trap is triggered
      Parameters:
      broadcastingSound - if the sound should be played
    • getUpgradeLevel

      public UpgradeLevel getUpgradeLevel()
      Returns the UpgradeLevel that belongs to the upgrade that's being triggered, or the trap that's being purchased
      Returns:
      UpgradeLevel that's being triggered
    • getAmplifier

      public double getAmplifier()
      Returns the amplifier that's being applied to this upgrade
      Returns:
      the amplifier for the upgrade level being triggered
    • getDuration

      public int getDuration()
      Returns the duration that's being applied to this upgrade
      Returns:
      the duration for the upgrade level being triggered
    • isTrap

      public boolean isTrap()
      Returns if the handler attached to this UpgradeLevel is a trap handler
      Returns:
      check if the upgrade level that was purchased is a trap
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean bool)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlers

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

      public static HandlerList getHandlerList()