Package com.sk89q.worldedit.command.tool
Class BrushTool
java.lang.Object
com.sk89q.worldedit.command.tool.BrushTool
- Direct Known Subclasses:
DistanceWand
,LongRangeBuildTool
Builds a shape at the place being looked at.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
actPrimary
(Platform server, LocalConfiguration config, Player player, LocalSession session) Perform the primary action of this trace tool.boolean
Checks to see if the player can still be using this tool (considering permissions and such).getBrush()
Get the current brush.getMask()
Get the filter.Get the material.int
getRange()
Get the set brush range.double
getSize()
Get the set brush size.Get the mask used for identifying where to stop traces.void
Set the brush.void
Set the material.void
Set the block filter used for identifying blocks to replace.void
setRange
(int range) Set the set brush range.void
setSize
(double radius) Set the set brush size.void
setTraceMask
(Mask traceMask) Set the block mask used for identifying where to stop traces.
-
Field Details
-
MAX_RANGE
protected static int MAX_RANGE -
range
protected int range
-
-
Constructor Details
-
BrushTool
Construct the tool.- Parameters:
permission
- the permission to check before use is allowed
-
-
Method Details
-
canUse
Description copied from interface:Tool
Checks to see if the player can still be using this tool (considering permissions and such). -
getMask
Get the filter.- Returns:
- the filter
-
setMask
Set the block filter used for identifying blocks to replace.- Parameters:
filter
- the filter to set
-
getTraceMask
Get the mask used for identifying where to stop traces.- Returns:
- the mask used to stop block traces
-
setTraceMask
Set the block mask used for identifying where to stop traces.- Parameters:
traceMask
- the mask used to stop block traces
-
setBrush
Set the brush.- Parameters:
brush
- the brushpermission
- the permission
-
getBrush
Get the current brush.- Returns:
- the current brush
-
setFill
Set the material.- Parameters:
material
- the material
-
getMaterial
Get the material.- Returns:
- the material
-
getSize
public double getSize()Get the set brush size.- Returns:
- a radius
-
setSize
public void setSize(double radius) Set the set brush size.- Parameters:
radius
- a radius
-
getRange
public int getRange()Get the set brush range.- Returns:
- the range of the brush in blocks
-
setRange
public void setRange(int range) Set the set brush range.- Parameters:
range
- the range of the brush in blocks
-
actPrimary
public boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session) Description copied from interface:TraceTool
Perform the primary action of this trace tool.- Specified by:
actPrimary
in interfaceTraceTool
- Parameters:
server
- The platformconfig
- The config instanceplayer
- The playersession
- The local session- Returns:
- true to cancel the original event which triggered this action (if possible)
-