Class PlayerUseSpecialItemFireballEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerUseSpecialItemFireballEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when a player is about to use the
SpecialItemType.FIREBALL
special item.
It is not possible to cancel this event. Listen to PlayerUseSpecialItemEvent
instead.
-
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
ConstructorDescriptionPlayerUseSpecialItemFireballEvent
(PlayerUseSpecialItemEvent origin, ProjectileSource shooter, Location spawnLocation, Vector direction, float yield, double flightSpeed, boolean flyStraight) -
Method Summary
Modifier and TypeMethodDescriptiongetArena()
Returns theArena
that is involved in this event.Returns the direction in which the fireball shall fly.double
Returns the speed of the fireball.static HandlerList
Returns the event that was called right before this event.Returns the entity from whom the fireball shall come from.Returns the location where the fireball shall spawn.float
getYield()
Returns the yield of the explosion.boolean
Returns whether the fireball shall fly straight.void
setDirection
(Vector direction) Sets the direction in which the fireball shall fly.void
setFlightSpeed
(double flightSpeed) Sets the speed of the fireball.void
setFlyStraight
(boolean flyStraight) Sets whether the fireball shall fly straight.void
setShooter
(ProjectileSource shooter) Sets the entity from whom the fireball shall come from.void
setSpawnLocation
(Location spawnLocation) Sets the location where the fireball shall spawn.void
setYield
(float yield) Sets the yield of the explosion.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerUseSpecialItemFireballEvent
public PlayerUseSpecialItemFireballEvent(PlayerUseSpecialItemEvent origin, ProjectileSource shooter, Location spawnLocation, Vector direction, float yield, double flightSpeed, boolean flyStraight)
-
-
Method Details
-
getArena
Description copied from interface:ArenaEvent
Returns theArena
that is involved in this event.- Specified by:
getArena
in interfaceArenaEvent
- Returns:
- The arena that is involved
-
getOriginEvent
Returns the event that was called right before this event.- Returns:
- The origin event
-
getShooter
Returns the entity from whom the fireball shall come from.By default it's equal to the player who has used the special item.
- Returns:
- The entity from whom the fireball shall come from
-
setShooter
Sets the entity from whom the fireball shall come from.- Parameters:
shooter
- The new entity from whom the fireball shall come from
-
getSpawnLocation
Returns the location where the fireball shall spawn.By default it's nearby the player's eye location.
- Returns:
- The location where the fireball shall spawn
-
setSpawnLocation
Sets the location where the fireball shall spawn.- Parameters:
spawnLocation
- The new location where the fireball shall spawn
-
getDirection
Returns the direction in which the fireball shall fly.By default it's equal to the player's looking direction.
- Returns:
- The direction in which the fireball shall fly
-
setDirection
Sets the direction in which the fireball shall fly.- Parameters:
direction
- The new direction in which the fireball shall fly
-
getYield
public float getYield()Returns the yield of the explosion.- Returns:
- The yield of the explosion
-
setYield
public void setYield(float yield) Sets the yield of the explosion.- Parameters:
yield
- The new yield of the explosion
-
getFlightSpeed
public double getFlightSpeed()Returns the speed of the fireball.- Returns:
- The speed of the fireball
-
setFlightSpeed
public void setFlightSpeed(double flightSpeed) Sets the speed of the fireball.- Parameters:
flightSpeed
- The new speed of the fireball
-
isFlyingStraight
public boolean isFlyingStraight()Returns whether the fireball shall fly straight.Vanilla adds a small random deviation to the fireball's trajectory.
- Returns:
- If the fireball shall fly straight
-
setFlyStraight
public void setFlyStraight(boolean flyStraight) Sets whether the fireball shall fly straight.Vanilla adds a small random deviation to the fireball's trajectory.
- Parameters:
flyStraight
- If the fireball shall fly straight
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-