Class OllivandersSpellProjectileMoveEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
net.pottercraft.ollivanders2.spell.events.OllivandersSpellProjectileMoveEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class OllivandersSpellProjectileMoveEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
The event that is triggered when a spell projectile moves
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionOllivandersSpellProjectileMoveEvent(@NotNull org.bukkit.entity.Player player, @NotNull O2Spell spell, @NotNull org.bukkit.Location from, @NotNull org.bukkit.Location to) Constructor -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.LocationgetFrom()Get the location where the projectile moved fromstatic org.bukkit.event.HandlerListGet the handlers for this Event@NotNull org.bukkit.event.HandlerListGet the handlers for this Event@NotNull O2SpellgetSpell()Get the spell this projectile is@NotNull org.bukkit.LocationgetTo()Get the location the projectile moved tobooleanIs this event canceled?voidsetCancelled(boolean cancel) Set whether this event is canceled or notMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
OllivandersSpellProjectileMoveEvent
public OllivandersSpellProjectileMoveEvent(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull O2Spell spell, @NotNull @NotNull org.bukkit.Location from, @NotNull @NotNull org.bukkit.Location to) Constructor- Parameters:
player- the player who created the spell projectilespell- the spell projectilefrom- where it moved fromto- where it moved to
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Get the handlers for this Event- Specified by:
getHandlersin classorg.bukkit.event.Event- Returns:
- the event handlers
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Get the handlers for this Event- Returns:
- the event handlers
-
isCancelled
public boolean isCancelled()Is this event canceled?- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
- true if canceled, false otherwise
-
setCancelled
public void setCancelled(boolean cancel) Set whether this event is canceled or not- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancel- true if event should be canceled, false otherwise
-
getFrom
@NotNull public @NotNull org.bukkit.Location getFrom()Get the location where the projectile moved from- Returns:
- the locationt the spell moved from
-
getTo
@NotNull public @NotNull org.bukkit.Location getTo()Get the location the projectile moved to- Returns:
- the location the projectile moved to
-
getSpell
Get the spell this projectile is- Returns:
- the spell for this projectile
-