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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionKonquestKingdomCapitalSwapEvent
(KonquestAPI konquest, KonquestKingdom kingdom, KonquestCapital capital, KonquestTown town) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the capital after the swap.static org.bukkit.event.HandlerList
Get the handler listorg.bukkit.event.HandlerList
Get the handler listgetTown()
Gets the town after the swap.Methods inherited from class com.github.rumsfield.konquest.api.event.kingdom.KonquestKingdomEvent
getKingdom
Methods inherited from class com.github.rumsfield.konquest.api.event.KonquestEvent
getKonquest
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
KonquestKingdomCapitalSwapEvent
public KonquestKingdomCapitalSwapEvent(KonquestAPI konquest, KonquestKingdom kingdom, KonquestCapital capital, KonquestTown town) Default constructor- Parameters:
konquest
- The API instancekingdom
- The kingdomcapital
- The new capitaltown
- The town (old capital)
-
-
Method Details
-
getCapital
Gets the capital after the swap. This used to be a town in the kingdom.- Returns:
- The new capital
-
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 classKonquestEvent
- Returns:
- handlers
-