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

public class WaypointCreateEvent extends PlayerEvent implements 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:
  • Constructor Details

    • WaypointCreateEvent

      public WaypointCreateEvent(@Nonnull Player player, @Nonnull String name, @Nonnull Location location)
  • Method Details

    • getLocation

      @Nonnull public Location getLocation()
      This returns the Location of the waypoint that should be created.
      Returns:
      The Location of this waypoint
    • setLocation

      public void setLocation(@Nonnull Location loc)
      This sets the Location of the waypoint. The Location may never be null!
      Parameters:
      loc - The Location to set
    • getName

      @Nonnull public String getName()
      This returns the name of the waypoint.
      Returns:
      The name of this waypoint
    • setName

      public void setName(@Nonnull String name)
      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 our Player has died.
      Returns:
      Whether this is a deathpoint
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlerList

      @Nonnull public static HandlerList getHandlerList()
    • getHandlers

      @Nonnull public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event