public class BrushTool extends Object implements TraceTool
| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAX_RANGE |
protected int |
range |
| Constructor and Description |
|---|
BrushTool(String permission)
Construct the tool.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
actPrimary(Platform server,
LocalConfiguration config,
Player player,
LocalSession session) |
boolean |
canUse(Actor player)
Checks to see if the player can still be using this tool (considering
permissions and such).
|
Brush |
getBrush()
Get the current brush.
|
Mask |
getMask()
Get the filter.
|
Pattern |
getMaterial()
Get the material.
|
int |
getRange()
Get the set brush range.
|
double |
getSize()
Get the set brush size.
|
void |
setBrush(Brush brush,
String permission)
Set the brush.
|
void |
setFill(Pattern material)
Set the material.
|
void |
setMask(Mask filter)
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.
|
public BrushTool(String permission)
permission - the permission to check before use is allowedpublic boolean canUse(Actor player)
Toolpublic Mask getMask()
public void setMask(Mask filter)
filter - the filter to setpublic void setBrush(Brush brush, String permission)
brush - tbe brushpermission - the permissionpublic Brush getBrush()
public void setFill(Pattern material)
material - the materialpublic Pattern getMaterial()
public double getSize()
public void setSize(double radius)
radius - a radiuspublic int getRange()
public void setRange(int range)
range - the range of the brush in blockspublic boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session)
actPrimary in interface TraceToolCopyright © 2010-2014. All Rights Reserved.