use of com.sk89q.worldedit.command.tool.brush.OperationFactoryBrush in project FastAsyncWorldEdit by IntellectualSites.
the class BrushCommands method setOperationBasedBrush.
// FAWE end
static void setOperationBasedBrush(Player player, LocalSession session, double radius, Contextual<? extends Operation> factory, RegionFactory shape, String permission) throws WorldEditException {
WorldEdit.getInstance().checkMaxBrushRadius(radius);
BrushTool tool = session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType());
tool.setSize(radius);
tool.setFill(null);
tool.setBrush(new OperationFactoryBrush(factory, shape, session), permission);
player.print(Caption.of("worldedit.brush.operation.equip", TextComponent.of(factory.toString())));
ToolCommands.sendUnbindInstruction(player, UNBIND_COMMAND_COMPONENT);
}
use of com.sk89q.worldedit.command.tool.brush.OperationFactoryBrush in project FastAsyncWorldEdit by IntellectualSites.
the class BrushCommands method setOperationBasedBrush.
// FAWE end
static void setOperationBasedBrush(Player player, LocalSession session, // FAWE start - Expression > double
Expression radius, // FAWE end
Contextual<? extends Operation> factory, RegionFactory shape, String permission) throws WorldEditException {
WorldEdit.getInstance().checkMaxBrushRadius(radius);
BrushTool tool = session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType());
tool.setSize(radius);
tool.setFill(null);
tool.setBrush(new OperationFactoryBrush(factory, shape, session), permission);
player.print(Caption.of("worldedit.brush.operation.equip", TextComponent.of(factory.toString())));
ToolCommands.sendUnbindInstruction(player, UNBIND_COMMAND_COMPONENT);
}
Aggregations