Class WaypointCreateEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.github.thebusybiscuit.slimefun4.api.events.WaypointCreateEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class WaypointCreateEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
A
WaypointCreateEvent
is called when a Player
creates a new waypoint.
Either manually or through dying with an emergency transmitter.- Author:
- TheBusyBiscuit
- See Also:
-
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
ConstructorsConstructorDescriptionWaypointCreateEvent
(org.bukkit.entity.Player player, String name, org.bukkit.Location location) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.Location
This returns theLocation
of the waypoint that should be created.getName()
This returns the name of the waypoint.boolean
boolean
This method returns whether this waypoint was created by an Emergency Transmitter.void
setCancelled
(boolean cancel) void
setLocation
(org.bukkit.Location loc) This sets theLocation
of the waypoint.void
This sets the name of the waypoint to the given argument.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
WaypointCreateEvent
public WaypointCreateEvent(@Nonnull org.bukkit.entity.Player player, @Nonnull String name, @Nonnull org.bukkit.Location location)
-
-
Method Details
-
getLocation
@Nonnull public org.bukkit.Location getLocation()This returns theLocation
of the waypoint that should be created.- Returns:
- The
Location
of this waypoint
-
setLocation
public void setLocation(@Nonnull org.bukkit.Location loc) This sets theLocation
of the waypoint. TheLocation
may never be null!- Parameters:
loc
- TheLocation
to set
-
getName
This returns the name of the waypoint.- Returns:
- The name of this waypoint
-
setName
This sets the name of the waypoint to the given argument.- Parameters:
name
- The name for this waypoint
-
isDeathpoint
public boolean isDeathpoint()This method returns whether this waypoint was created by an Emergency Transmitter. This should mean that ourPlayer
has died.- Returns:
- Whether this is a deathpoint
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlerList
@Nonnull public static org.bukkit.event.HandlerList getHandlerList() -
getHandlers
@Nonnull public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-