Class PlayerTriggerUpgradeEvent
java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.player.PlayerTriggerUpgradeEvent
- All Implemented Interfaces:
- ArenaEvent,- Cancellable
Gets called when an upgrade is bought (and thus automatically triggered) or a trap is triggered.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerTriggerUpgradeEvent(@Nullable Player player, Arena arena, Team team, UpgradeLevel upgradeLevel) PlayerTriggerUpgradeEvent(Player player, Arena arena, Team team, UpgradeLevel upgradeLevel, boolean broadcastingMessage, boolean broadcastingTitle, boolean broadcastingSound, boolean takingFromQueue) 
- 
Method SummaryModifier and TypeMethodDescriptiondoubleReturns the amplifier that's being applied to this upgradegetArena()Returns the arena in which the trap was triggered.intReturns the duration that's being applied to this upgradestatic HandlerList@Nullable PlayerReturns the player that triggered the upgrade or trap.getTeam()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 purchasedbooleanGet whether any player triggered the upgrade or trap.booleanGet whether this upgrade was virtually done using the API.booleanWhether or not a message will be sent out to all team players when an upgrade is purchased, or when a trap is triggeredbooleanWhether or not a sound will be played when an upgrade is purchased, or when a trap is triggeredbooleanWhether or not a title will be sent out to all team players when an upgrade is purchased, or when a trap is triggeredbooleanIf true the trap will be pulled from the upgrade queue.booleanisTrap()Returns if the handler attached to this UpgradeLevel is a trap handlervoidsetBroadcastingMessage(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 triggeredvoidsetBroadcastingSound(boolean broadcastingSound) Set whether or not a sound should be played when an upgrade is purchased, or when a trap is triggeredvoidsetBroadcastingTitle(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 triggeredvoidsetTakingFromQueue(boolean takingFromQueue) If true the trap will be pulled from the upgrade queue.Methods inherited from class org.bukkit.event.EventgetEventName, isAsynchronousMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.event.CancellableisCancelled, setCancelled
- 
Constructor Details- 
PlayerTriggerUpgradeEventpublic PlayerTriggerUpgradeEvent(Player player, Arena arena, Team team, UpgradeLevel upgradeLevel, boolean broadcastingMessage, boolean broadcastingTitle, boolean broadcastingSound, boolean takingFromQueue) 
- 
PlayerTriggerUpgradeEventpublic PlayerTriggerUpgradeEvent(@Nullable @Nullable Player player, Arena arena, Team team, UpgradeLevel upgradeLevel) 
 
- 
- 
Method Details- 
getPlayerReturns the player that triggered the upgrade or trap.It can be nullif the upgrade was triggered using the API.- Returns:
- The player that triggered the upgrade or trap. May be null
- See Also:
 
- 
hasPlayerpublic boolean hasPlayer()Get whether any player triggered the upgrade or trap.This may be falseif the upgrade was triggered using the API.- Returns:
- trueif there is a known player that triggered the upgrade or trap
- See Also:
 
- 
getArenaReturns the arena in which the trap was triggered.- Specified by:
- getArenain interface- ArenaEvent
- Returns:
- The arena involved
 
- 
getTeamReturns the team in which the upgrade or trap belongs to.- Returns:
- The team involved
 
- 
isAPICallpublic boolean isAPICall()Get whether this upgrade was virtually done using the API.- Returns:
- trueif an addon triggered.- falseif a player himself triggered it
- See Also:
 
- 
isTakingFromQueuepublic 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
 
- 
setTakingFromQueuepublic 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
 
- 
isBroadcastingMessagepublic 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
 
- 
setBroadcastingMessagepublic 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
 
- 
isBroadcastingTitlepublic 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
 
- 
setBroadcastingTitlepublic 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
 
- 
isBroadcastingSoundpublic 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
 
- 
setBroadcastingSoundpublic 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
 
- 
getUpgradeLevelReturns the UpgradeLevel that belongs to the upgrade that's being triggered, or the trap that's being purchased- Returns:
- UpgradeLevel that's being triggered
 
- 
getAmplifierpublic double getAmplifier()Returns the amplifier that's being applied to this upgrade- Returns:
- the amplifier for the upgrade level being triggered
 
- 
getDurationpublic int getDuration()Returns the duration that's being applied to this upgrade- Returns:
- the duration for the upgrade level being triggered
 
- 
isTrappublic 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
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-