Class PlayerAutoPlotsChosenEvent


public class PlayerAutoPlotsChosenEvent extends PlotPlayerEvent
Event fired when the plots that are to be claimed by a player executing a /plot auto have been chosen. It contains an unmodifiable list of the plots selected. This may be of length 0. This event is effectively cancellable by setting the list of plots to an empty list.
  • Constructor Details

    • PlayerAutoPlotsChosenEvent

      public PlayerAutoPlotsChosenEvent(PlotPlayer<?> player, List<Plot> plots)
      PlayerAutoPlotsChosenEvent: Called when one or more plots are chosen for a /plot auto
      Parameters:
      player - Player that executed the auto
      plots - Plots that have been chosen to be set to the player
  • Method Details

    • getPlot

      public @Nullable Plot getPlot()
      Returns the plot at index 0 in the list of plots selected. May be null if the list was of length 0.
      Overrides:
      getPlot in class PlotEvent
      Returns:
      plot at index 0 or null.
    • getPlots

      public @NonNull List<Plot> getPlots()
      Get the immutable list of plots selected to be claimed by the player. May be of length 0.
      Returns:
      immutable list.
    • setPlots

      public void setPlots(@NonNull List<Plot> plots)
      Set the plots to be claimed by the player.
      Parameters:
      plots - list of plots.