Class TownSpawnEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class TownSpawnEvent extends SpawnEvent
An event called when town spawns occur.
Author:
Suneet Tipirneni (Siris)
  • Constructor Details

    • TownSpawnEvent

      public TownSpawnEvent(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.