Class WaypointCreateEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.github.thebusybiscuit.slimefun4.api.events.WaypointCreateEvent
- All Implemented Interfaces:
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
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerListThis returns theLocationof the waypoint that should be created.getName()This returns the name of the waypoint.booleanbooleanThis method returns whether this waypoint was created by an Emergency Transmitter.voidsetCancelled(boolean cancel) voidsetLocation(Location loc) This sets theLocationof the waypoint.voidThis sets the name of the waypoint to the given argument.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
WaypointCreateEvent
-
-
Method Details
-
getLocation
This returns theLocationof the waypoint that should be created.- Returns:
- The
Locationof this waypoint
-
setLocation
- Parameters:
loc- TheLocationto 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 ourPlayerhas died.- Returns:
- Whether this is a deathpoint
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceCancellable
-
getHandlerList
-
getHandlers
- Specified by:
getHandlersin classEvent
-