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.intDeprecated, for removal: This API element is subject to removal in a future version.for removal.intDeprecated, for removal: This API element is subject to removal in a future version.for removal.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.voidsetSize_x(int sizeX) Deprecated, for removal: This API element is subject to removal in a future version.for removal.voidsetSize_z(int sizeZ) Deprecated, for removal: This API element is subject to removal in a future version.for removal.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
-
getSize_x
Deprecated, for removal: This API element is subject to removal in a future version.for removal. UsegetSizeX() -
setSize_x
Deprecated, for removal: This API element is subject to removal in a future version.for removal. UsesetSizeX(int))} -
getSize_z
Deprecated, for removal: This API element is subject to removal in a future version.for removal. UsegetSizeZ() -
setSize_z
Deprecated, for removal: This API element is subject to removal in a future version.for removal. UsesetSizeZ(int))} -
getSizeX
public int getSizeX()Get the x size of the auto-area- Returns:
- x size
- Since:
- 6.1.0
-
setSizeX
public void setSizeX(int sizeX) Set the x size of the auto-area- Parameters:
sizeX- x size- Since:
- 6.1.0
-
getSizeZ
public int getSizeZ()Get the z size of the auto-area- Returns:
- z size
- Since:
- 6.1.0
-
setSizeZ
public void setSizeZ(int sizeZ) Set the z size of the auto-area- Parameters:
sizeZ- z size- Since:
- 6.1.0
-