Class KonquestKingdomCapitalSwapEvent

java.lang.Object
org.bukkit.event.Event
com.github.rumsfield.konquest.api.event.KonquestEvent
com.github.rumsfield.konquest.api.event.kingdom.KonquestKingdomEvent
com.github.rumsfield.konquest.api.event.kingdom.KonquestKingdomCapitalSwapEvent

public class KonquestKingdomCapitalSwapEvent extends KonquestKingdomEvent
Called after a kingdom swaps its capital to another town.

A capital swap involves changing a town into the kingdom's new capital, and preserves the town's land claims, upgrades, residents, and all other attributes. The original capital takes the name of the town. Kingdom masters may move the capital to another town, if allowed by the Konquest configuration. This event cannot be canceled, as it is called after the capital swap is finished.

  • Constructor Details

    • KonquestKingdomCapitalSwapEvent

      public KonquestKingdomCapitalSwapEvent(KonquestAPI konquest, KonquestKingdom kingdom, KonquestCapital capital, KonquestTown town)
      Default constructor
      Parameters:
      konquest - The API instance
      kingdom - The kingdom
      capital - The new capital
      town - The town (old capital)
  • Method Details

    • getCapital

      public KonquestCapital getCapital()
      Gets the capital after the swap. This used to be a town in the kingdom.
      Returns:
      The new capital
    • getTown

      public KonquestTown getTown()
      Gets the town after the swap. This used to be the kingdom's capital.
      Returns:
      The new town
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Get the handler list
      Returns:
      handlers
    • getHandlers

      @Nonnull public org.bukkit.event.HandlerList getHandlers()
      Get the handler list
      Specified by:
      getHandlers in class KonquestEvent
      Returns:
      handlers