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
-
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
ConstructorDescriptionPlayerTriggerUpgradeEvent
(Player player, Arena arena, Team team, UpgradeLevel upgradeLevel, boolean broadcastingMessage, boolean broadcastingTitle, boolean broadcastingSound, boolean takingFromQueue) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the amplifier that's being applied to this upgradegetArena()
Returns the arena in which the trap was triggered.int
Returns the duration that's being applied to this upgradestatic HandlerList
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 purchasedboolean
Whether or not a message will be sent out to all team players when an upgrade is purchased, or when a trap is triggeredboolean
Whether or not a sound will be played when an upgrade is purchased, or when a trap is triggeredboolean
Whether or not a title will be sent out to all team players when an upgrade is purchased, or when a trap is triggeredboolean
boolean
If true the trap will be pulled from the upgrade queue.boolean
isTrap()
Returns if the handler attached to this UpgradeLevel is a trap handlervoid
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 triggeredvoid
setBroadcastingSound
(boolean broadcastingSound) Set whether or not a sound should be played when an upgrade is purchased, or when a trap is triggeredvoid
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 triggeredvoid
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
-
Constructor Details
-
PlayerTriggerUpgradeEvent
public PlayerTriggerUpgradeEvent(Player player, Arena arena, Team team, UpgradeLevel upgradeLevel, boolean broadcastingMessage, boolean broadcastingTitle, boolean broadcastingSound, boolean takingFromQueue)
-
-
Method Details
-
getArena
Returns the arena in which the trap was triggered.- Specified by:
getArena
in interfaceArenaEvent
- Returns:
- The arena involved
-
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
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 interfaceCancellable
-
setCancelled
public void setCancelled(boolean bool) - Specified by:
setCancelled
in interfaceCancellable
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-