Class TownSetSpawnEvent

java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.CancellableTownyEvent
com.palmergames.bukkit.towny.event.town.TownSetSpawnEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class TownSetSpawnEvent extends CancellableTownyEvent
Fired when a player uses /town set spawn
  • Constructor Details

    • TownSetSpawnEvent

      public TownSetSpawnEvent(Town town, org.bukkit.entity.Player player, org.bukkit.Location newSpawn)
  • Method Details

    • getTown

      @NotNull public @NotNull Town getTown()
      Returns:
      The town for which this spawn is being set.
    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.Player getPlayer()
      Returns:
      The player that ran the command
    • getOldSpawn

      @Nullable public @Nullable org.bukkit.Location getOldSpawn()
      Returns:
      The town's old spawnpoint location.
    • getNewSpawn

      @NotNull public @NotNull org.bukkit.Location getNewSpawn()
      Returns:
      The new spawn location.
    • setNewSpawn

      public void setNewSpawn(@NotNull @NotNull org.bukkit.Location newSpawn)
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event