Search in sources :

Example 1 with AreaPickaxe

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

the class SuperPickaxeCommands method area.

@Command(name = "area", desc = "Enable the area super pickaxe pickaxe mode")
@CommandPermissions("worldedit.superpickaxe.area")
public void area(Player player, LocalSession session, @Arg(desc = "The range of the area pickaxe") 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;
    }
    session.setSuperPickaxe(new AreaPickaxe(range));
    session.enableSuperPickAxe();
    player.print(Caption.of("worldedit.tool.superpickaxe.mode.area"));
}
Also used : AreaPickaxe(com.sk89q.worldedit.command.tool.AreaPickaxe) 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 AreaPickaxe (com.sk89q.worldedit.command.tool.AreaPickaxe)1 CommandPermissions (com.sk89q.worldedit.command.util.CommandPermissions)1 Command (org.enginehub.piston.annotation.Command)1