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
ConstructorDescriptionPlayerAutoPlotEvent
(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 theClaim
command or null.int
Deprecated, for removal: This API element is subject to removal in a future version.for removal.int
Deprecated, for removal: This API element is subject to removal in a future version.for removal.int
getSizeX()
Get the x size of the auto-areaint
getSizeZ()
Get the z size of the auto-areavoid
void
setSchematic
(String schematic) Set the schematic string used in the claim.void
setSize_x
(int sizeX) Deprecated, for removal: This API element is subject to removal in a future version.for removal.void
setSize_z
(int sizeZ) Deprecated, for removal: This API element is subject to removal in a future version.for removal.void
setSizeX
(int sizeX) Set the x size of the auto-areavoid
setSizeZ
(int sizeZ) Set the z size of the auto-areaMethods inherited from class com.plotsquared.core.events.PlotEvent
getEventName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 theClaim
command or null.- Returns:
- schematic string
-
setSchematic
Set the schematic string used in the claim.- Parameters:
schematic
- the schematic name
-
getEventResult
- Specified by:
getEventResult
in interfaceCancellablePlotEvent
-
setEventResult
- Specified by:
setEventResult
in 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
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
-