Search in sources :

Example 1 with ItemUseFactory

use of com.sk89q.worldedit.command.factory.ItemUseFactory in project FastAsyncWorldEdit by IntellectualSites.

the class PaintBrushCommands method item.

@Command(name = "item", desc = "Use an item")
@CommandPermissions("worldedit.brush.item")
public void item(CommandParameters parameters, Player player, LocalSession localSession, @Arg(desc = "The type of item to use") BaseItem item, @Arg(desc = "The direction in which the item will be applied", def = "up") @Direction(includeDiagonals = true) com.sk89q.worldedit.util.Direction direction) throws WorldEditException {
    player.print(TextComponent.builder().append("WARNING: ").append(Caption.of("worldedit.brush.paint.item.warning")).build());
    setPaintBrush(parameters, player, localSession, new ItemUseFactory(item, direction));
}
Also used : ItemUseFactory(com.sk89q.worldedit.command.factory.ItemUseFactory) Command(org.enginehub.piston.annotation.Command) CommandPermissions(com.sk89q.worldedit.command.util.CommandPermissions)

Example 2 with ItemUseFactory

use of com.sk89q.worldedit.command.factory.ItemUseFactory in project FastAsyncWorldEdit by IntellectualSites.

the class ApplyBrushCommands method item.

@Command(name = "item", desc = "Use an item")
@CommandPermissions("worldedit.brush.item")
public void item(CommandParameters parameters, Player player, LocalSession localSession, @Arg(desc = "The type of item to use") BaseItem item, @Arg(desc = "The direction in which the item will be applied", def = "up") @Direction(includeDiagonals = true) com.sk89q.worldedit.util.Direction direction) throws WorldEditException {
    player.print(TextComponent.builder().append("WARNING: ").append(Caption.of("worldedit.brush.apply.item.warning")).build());
    setApplyBrush(parameters, player, localSession, new ItemUseFactory(item, direction));
}
Also used : ItemUseFactory(com.sk89q.worldedit.command.factory.ItemUseFactory) Command(org.enginehub.piston.annotation.Command) CommandPermissions(com.sk89q.worldedit.command.util.CommandPermissions)

Aggregations

ItemUseFactory (com.sk89q.worldedit.command.factory.ItemUseFactory)2 CommandPermissions (com.sk89q.worldedit.command.util.CommandPermissions)2 Command (org.enginehub.piston.annotation.Command)2