Package com.plotsquared.core.events
Class PlayerAutoPlotsChosenEvent
java.lang.Object
com.plotsquared.core.events.PlotEvent
com.plotsquared.core.events.PlotPlayerEvent
com.plotsquared.core.events.PlayerAutoPlotsChosenEvent
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 Summary
ConstructorDescriptionPlayerAutoPlotsChosenEvent
(PlotPlayer<?> player, List<Plot> plots) PlayerAutoPlotsChosenEvent: Called when one or more plots are chosen for a /plot auto -
Method Summary
Methods inherited from class com.plotsquared.core.events.PlotPlayerEvent
getPlotPlayer
Methods inherited from class com.plotsquared.core.events.PlotEvent
getEventName
-
Constructor Details
-
PlayerAutoPlotsChosenEvent
PlayerAutoPlotsChosenEvent: Called when one or more plots are chosen for a /plot auto- Parameters:
player
- Player that executed the autoplots
- Plots that have been chosen to be set to the player- Since:
- 6.1.0
-
-
Method Details
-
getPlot
Returns the plot at index 0 in the list of plots selected. May be null if the list was of length 0. -
getPlots
Get the immutable list of plots selected to be claimed by the player. May be of length 0.- Returns:
- immutable list.
- Since:
- 6.1.0
-
setPlots
Set the plots to be claimed by the player.- Parameters:
plots
- list of plots.- Since:
- 6.1.0
-