Package org.kingdoms.events.lands
Class ClaimingEvent
java.lang.Object
org.bukkit.event.Event
org.kingdoms.events.KingdomsEvent
org.kingdoms.events.lands.ClaimingEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable,org.kingdoms.abstraction.GroupOperator,KingdomOperator,org.kingdoms.abstraction.PlayerOperator,org.kingdoms.constants.namespace.NamespacedMetadataContainer,org.kingdoms.locale.provider.MessageContextProvider
- Direct Known Subclasses:
ClaimLandEvent,UnclaimLandEvent
public abstract class ClaimingEvent
extends KingdomsEvent
implements org.bukkit.event.Cancellable, KingdomOperator, org.kingdoms.abstraction.PlayerOperator
A bulk claiming/unclaiming event that's called for claiming lands for a single kingdom.
The list of claims in this event is usaully from the same world, but it can be from multiple different worlds.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
Fields inherited from class org.kingdoms.events.KingdomsEvent
SILENCED -
Constructor Summary
ConstructorsConstructorDescriptionClaimingEvent(@Nullable KingdomPlayer player, @NonNull Kingdom kingdom, @NonNull Set<SimpleChunkLocation> lands, boolean claiming) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessageContextEdits(@NotNull MessageBuilder messageBuilder) @NonNull Kingdom@Unmodifiable @NonNull Set<SimpleChunkLocation>@Unmodifiable @NonNull Collection<Land>getLands()@Nullable KingdomPlayerbooleanvoidsetCancelled(boolean cancelled) voidsetLands(@NonNull Set<SimpleChunkLocation> lands) Methods inherited from class org.kingdoms.events.KingdomsEvent
getMetadata, getMetadata, isSilenced, silenceMethods inherited from class org.bukkit.event.Event
getEventName, getHandlers, isAsynchronousMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kingdoms.abstraction.KingdomOperator
getGroupMethods inherited from interface org.kingdoms.locale.provider.MessageContextProvider
getMessageContext
-
Constructor Details
-
ClaimingEvent
public ClaimingEvent(@Nullable KingdomPlayer player, @NonNull Kingdom kingdom, @NonNull Set<SimpleChunkLocation> lands, boolean claiming)
-
-
Method Details
-
addMessageContextEdits
- Specified by:
addMessageContextEditsin interfaceorg.kingdoms.locale.provider.MessageContextProvider- Overrides:
addMessageContextEditsin classKingdomsEvent
-
getLandLocations
-
getLands
- Returns:
- an unmodifiable cached list of Land objects that are not null (the land data isn't completely empty)
-
setLands
- Throws:
IllegalArgumentException- When the collection contains a null value or a land that cannot be claimed (being claimed by this or another kingdom.)
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
getKingdom
- Specified by:
getKingdomin interfaceKingdomOperator
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getPlayer
- Specified by:
getPlayerin interfaceorg.kingdoms.abstraction.PlayerOperator
-