API/Selection

Selection

Description

The Selection class is a class which represents an in game selection.
The class contains methods that allow you to manipulate the selection.

Important methods

Selection(Location setstart, Location setend)

Description
A constructor.
Parameter
setstart: One corner of the selection.
setend: The other corner of the selection.

Selection(World world, int startX, int startY, int startZ, int endX, int endY, int endZ)

Description
A constructor.
Parameter
world: The world the selection is in.
startX: The X-coordinate of the first corner.
startY: The Y-coordinate of the first corner.
startZ: The Z-coordinate of the first corner.
endX: The X-coordinate of the other corner.
endY: The Y-coordinate of the other corner.
endZ: The Z-coordinate of the other corner.

Location getStart()

Description
Used get one of the corners of the selection.
Return value
returns the location of the corner.

Location getEnd()

Description
Used get one of the corners of the selection.
Return value
returns the location of the corner.

int getXsize()

Description
Used to get the size of the selection along the X dimension.
Return value
returns the size in blocks along the X dimension.

int getYsize()

Description
Used to get the size of the selection along the Y dimension.
Return value
returns the size in blocks along the Y dimension.

int getZsize()

Description
Used to get the size of the selection along the Z dimension.
Return value
returns the size in blocks along the Z dimension.

int getVolume()

Description
Used to get the total size of the selection.
Return value
returns the size (amount of blocks) of the selection.

int getWorld()

Description
Used to get the world the selection is in.
Return value
returns the world the selection is in.

boolean isValid()

Description
Used to see whether a selection is a real selection.
Return value
returns the true if the selection is a real one and false otherwise.

boolean isAllowed()

Description
Used to see whether a selection is a allowed according to the configuration and valid.
Return value
returns the true if the selection is allowed and false otherwise.


Comments

Posts Quoted:
Reply
Clear All Quotes