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.
  • Constructor Details

  • Method Details

    • addMessageContextEdits

      public void addMessageContextEdits(@NotNull @NotNull MessageBuilder messageBuilder)
      Specified by:
      addMessageContextEdits in interface org.kingdoms.locale.provider.MessageContextProvider
      Overrides:
      addMessageContextEdits in class KingdomsEvent
    • getLandLocations

      public @Unmodifiable @NonNull Set<SimpleChunkLocation> getLandLocations()
    • getLands

      public @Unmodifiable @NonNull Collection<Land> getLands()
      Returns:
      an unmodifiable cached list of Land objects that are not null (the land data isn't completely empty)
    • setLands

      public void setLands(@NonNull Set<SimpleChunkLocation> lands)
      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:
      isCancelled in interface org.bukkit.event.Cancellable
    • getKingdom

      public @NonNull Kingdom getKingdom()
      Specified by:
      getKingdom in interface KingdomOperator
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getPlayer

      @Nullable public @Nullable KingdomPlayer getPlayer()
      Specified by:
      getPlayer in interface org.kingdoms.abstraction.PlayerOperator