Package com.plotsquared.core.events
Class PlayerAutoPlotEvent
java.lang.Object
com.plotsquared.core.events.PlotEvent
com.plotsquared.core.events.PlayerAutoPlotEvent
- All Implemented Interfaces:
CancellablePlotEvent
PlayerAutoPlotEvent returns null for
PlotEvent.getPlot() as the event is fired before the plot is chosen.-
Constructor Summary
ConstructorsConstructorDescriptionPlayerAutoPlotEvent(PlotPlayer<?> player, PlotArea plotArea, @Nullable String schematic, int sizeX, int sizeZ) PlayerAutoPlotEvent: called when a player attempts to auto claim a plot. -
Method Summary
Modifier and TypeMethodDescriptionPlotPlayer<?>getPlot()Returns null as the plots to be claimed haven't been chosen yet.Obtain the schematic string as used by theClaimcommand or null.intgetSizeX()Get the x size of the auto-areaintgetSizeZ()Get the z size of the auto-areavoidvoidsetSchematic(String schematic) Set the schematic string used in the claim.voidsetSizeX(int sizeX) Set the x size of the auto-areavoidsetSizeZ(int sizeZ) Set the z size of the auto-areaMethods inherited from class com.plotsquared.core.events.PlotEvent
getEventNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.plotsquared.core.events.CancellablePlotEvent
getEventResultRaw
-
Constructor Details
-
PlayerAutoPlotEvent
public PlayerAutoPlotEvent(PlotPlayer<?> player, PlotArea plotArea, @Nullable String schematic, int sizeX, int sizeZ) PlayerAutoPlotEvent: called when a player attempts to auto claim a plot.- Parameters:
player- The player attempting to auto claimplotArea- The applicable plot areaschematic- The schematic defined or nullsizeX- The size of the auto areasizeZ- The size of the auto area
-
-
Method Details
-
getPlot
Returns null as the plots to be claimed haven't been chosen yet. This will depend on the size of the auto (setSizeX(int)andsetSizeZ(int)). To see which plots have been chosen, seePlayerAutoPlotsChosenEvent. -
getSchematic
Obtain the schematic string as used by theClaimcommand or null.- Returns:
- schematic string
-
setSchematic
Set the schematic string used in the claim.- Parameters:
schematic- the schematic name
-
getEventResult
- Specified by:
getEventResultin interfaceCancellablePlotEvent
-
setEventResult
- Specified by:
setEventResultin interfaceCancellablePlotEvent
-
getPlayer
-
getPlotArea
-
getSizeX
Get the x size of the auto-area- Returns:
- x size
- Since:
- 6.1.0
-
setSizeX
Set the x size of the auto-area- Parameters:
sizeX- x size- Since:
- 6.1.0
-
getSizeZ
Get the z size of the auto-area- Returns:
- z size
- Since:
- 6.1.0
-
setSizeZ
Set the z size of the auto-area- Parameters:
sizeZ- z size- Since:
- 6.1.0
-