Class ResidentSpawnEvent

java.lang.Object
org.bukkit.event.Event
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ResidentSpawnEvent extends SpawnEvent
An event called when /res spawn occurs.
Author:
LlmDl
  • Constructor Details

    • ResidentSpawnEvent

      public ResidentSpawnEvent(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to, boolean cancelled, String cancelMessage)
  • Method Details

    • getToTown

      public Town getToTown()
      Gets the town that the player is teleporting to.
      Returns:
      The Town being teleported to.
    • getFromTown

      @Nullable public @Nullable Town getFromTown()
      Gets the town being teleported from.
      Returns:
      null if the player was not standing in a townblock, the town they were standing in otherwise.