Search in sources :

Example 1 with FloodFillTool

use of com.sk89q.worldedit.command.tool.FloodFillTool in project FastAsyncWorldEdit by IntellectualSites.

the class ToolCommands method floodFill.

@Command(name = "floodfill", aliases = { "flood", "/flood", "/floodfill" }, desc = "Flood fill tool")
@CommandPermissions("worldedit.tool.flood-fill")
public void floodFill(Player player, LocalSession session, @Arg(desc = "The pattern to flood fill") Pattern pattern, @Arg(desc = "The range to perform the fill") int range) throws WorldEditException {
    LocalConfiguration config = we.getConfiguration();
    if (range > config.maxSuperPickaxeSize) {
        player.print(Caption.of("worldedit.tool.superpickaxe.max-range", TextComponent.of(config.maxSuperPickaxeSize)));
        return;
    }
    setTool(player, session, new FloodFillTool(range, pattern), "worldedit.tool.floodfill.equip");
}
Also used : FloodFillTool(com.sk89q.worldedit.command.tool.FloodFillTool) LocalConfiguration(com.sk89q.worldedit.LocalConfiguration) Command(org.enginehub.piston.annotation.Command) CommandPermissions(com.sk89q.worldedit.command.util.CommandPermissions)

Aggregations

LocalConfiguration (com.sk89q.worldedit.LocalConfiguration)1 FloodFillTool (com.sk89q.worldedit.command.tool.FloodFillTool)1 CommandPermissions (com.sk89q.worldedit.command.util.CommandPermissions)1 Command (org.enginehub.piston.annotation.Command)1