Class ExtendingCuboidRegionSelector
java.lang.Object
com.sk89q.worldedit.regions.selector.CuboidRegionSelector
com.sk89q.worldedit.regions.selector.ExtendingCuboidRegionSelector
- All Implemented Interfaces:
CUIRegion
,RegionSelector
Creates a
CuboidRegion
from a user's selections by expanding
the region on every right click.-
Field Summary
Fields inherited from class com.sk89q.worldedit.regions.selector.CuboidRegionSelector
position1, position2, region
-
Constructor Summary
ConstructorDescriptionCreate a new selector with anull
world.ExtendingCuboidRegionSelector
(RegionSelector oldSelector) Create a new selector from another one.Create a new selector.ExtendingCuboidRegionSelector
(World world, BlockVector3 position1, BlockVector3 position2) Create a new selector. -
Method Summary
Modifier and TypeMethodDescriptionvoid
explainPrimarySelection
(Actor player, LocalSession session, BlockVector3 pos) Tell the player information about his/her primary selection.void
explainSecondarySelection
(Actor player, LocalSession session, BlockVector3 pos) Tell the player information about his/her secondary selection.boolean
selectPrimary
(BlockVector3 position, SelectorLimits limits) Called when the first point is selected.boolean
selectSecondary
(BlockVector3 position, SelectorLimits limits) Called when the second point is selected.Methods inherited from class com.sk89q.worldedit.regions.selector.CuboidRegionSelector
clear, describeCUI, describeLegacyCUI, explainRegionAdjust, getIncompleteRegion, getLegacyTypeID, getPrimaryPosition, getProtocolVersion, getRegion, getSelectionInfoLines, getTypeID, getTypeName, getVolume, getWorld, isDefined, learnChanges, setWorld
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.regions.RegionSelector
getArea, getInformationLines
-
Constructor Details
-
ExtendingCuboidRegionSelector
public ExtendingCuboidRegionSelector()Create a new selector with anull
world. -
ExtendingCuboidRegionSelector
Create a new selector.- Parameters:
world
- the world, which may benull
-
ExtendingCuboidRegionSelector
Create a new selector from another one.- Parameters:
oldSelector
- the other selector
-
ExtendingCuboidRegionSelector
public ExtendingCuboidRegionSelector(@Nullable World world, BlockVector3 position1, BlockVector3 position2) Create a new selector.- Parameters:
world
- the worldposition1
- the first positionposition2
- the second position
-
-
Method Details
-
selectPrimary
Description copied from interface:RegionSelector
Called when the first point is selected.- Specified by:
selectPrimary
in interfaceRegionSelector
- Overrides:
selectPrimary
in classCuboidRegionSelector
- Parameters:
position
- the position- Returns:
- true if something changed
-
selectSecondary
Description copied from interface:RegionSelector
Called when the second point is selected.- Specified by:
selectSecondary
in interfaceRegionSelector
- Overrides:
selectSecondary
in classCuboidRegionSelector
- Parameters:
position
- the position- Returns:
- true if something changed
-
explainPrimarySelection
Description copied from interface:RegionSelector
Tell the player information about his/her primary selection.- Specified by:
explainPrimarySelection
in interfaceRegionSelector
- Overrides:
explainPrimarySelection
in classCuboidRegionSelector
- Parameters:
player
- the actorsession
- the sessionpos
- position
-
explainSecondarySelection
Description copied from interface:RegionSelector
Tell the player information about his/her secondary selection.- Specified by:
explainSecondarySelection
in interfaceRegionSelector
- Overrides:
explainSecondarySelection
in classCuboidRegionSelector
- Parameters:
player
- the actorsession
- the sessionpos
- position
-