Class NationSetSpawnEvent

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

public class NationSetSpawnEvent extends CancellableTownyEvent
Fired when a player uses /nation set spawn
  • Constructor Details

    • NationSetSpawnEvent

      public NationSetSpawnEvent(Nation nation, org.bukkit.entity.Player player, org.bukkit.Location newSpawn)
  • Method Details

    • getNation

      @NotNull public @NotNull Nation getNation()
      Returns:
      The nation for which this spawn is being set.
    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.Player getPlayer()
      Returns:
      The player that is changing the spawn.
    • getOldSpawn

      @Nullable public @Nullable org.bukkit.Location getOldSpawn()
      Returns:
      The old spawn, or null if none has been set.
    • getNewSpawn

      @NotNull public @NotNull org.bukkit.Location getNewSpawn()
      Returns:
      The location where the spawn is being set to.
    • setNewSpawn

      public void setNewSpawn(@NotNull @NotNull org.bukkit.Location newSpawn)
      Parameters:
      newSpawn - Sets the location where the new spawn will be set to.
    • 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