Class NationSpawnEvent

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

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

    • NationSpawnEvent

      public NationSpawnEvent(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to, boolean cancelled, String cancelMessage)
      Called when a player is teleported to a nation.
      Parameters:
      player - The player being teleported.
      from - The location the player is teleporting from.
      to - The location the player is going to.
  • Method Details

    • getToNation

      public Nation getToNation()
      Gets the nation that the player to spawning to.
      Returns:
      The nation being spawned to.
    • getFromNation

      @Nullable public @Nullable Nation getFromNation()
      Gets the nation the player is spawning from.
      Returns:
      null if the player is not standing in a nation owned townblock, the nation otherwise.
    • getHandlerList

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

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Overrides:
      getHandlers in class SpawnEvent