当前位置: 首页>>代码示例>>Java>>正文


Java LocalSession.enableSuperPickAxe方法代码示例

本文整理汇总了Java中com.sk89q.worldedit.LocalSession.enableSuperPickAxe方法的典型用法代码示例。如果您正苦于以下问题:Java LocalSession.enableSuperPickAxe方法的具体用法?Java LocalSession.enableSuperPickAxe怎么用?Java LocalSession.enableSuperPickAxe使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sk89q.worldedit.LocalSession的用法示例。


在下文中一共展示了LocalSession.enableSuperPickAxe方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: area

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Command(
        aliases = {"area"},
        usage = "<radius>",
        desc = "Enable the area super pickaxe pickaxe mode",
        min = 1,
        max = 1
)
@CommandPermissions("worldedit.superpickaxe.area")
public void area(Player player, LocalSession session, CommandContext args) throws WorldEditException {

    LocalConfiguration config = we.getConfiguration();
    int range = args.getInteger(0);

    if (range > config.maxSuperPickaxeSize) {
        BBC.TOOL_RANGE_ERROR.send(player, config.maxSuperPickaxeSize);
        return;
    }

    session.setSuperPickaxe(new AreaPickaxe(range));
    session.enableSuperPickAxe();
    BBC.SUPERPICKAXE_AREA_ENABLED.send(player);
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:23,代码来源:SuperPickaxeCommands.java

示例2: recursive

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Command(
        aliases = {"recur", "recursive"},
        usage = "<radius>",
        desc = "Enable the recursive super pickaxe pickaxe mode",
        min = 1,
        max = 1
)
@CommandPermissions("worldedit.superpickaxe.recursive")
public void recursive(Player player, LocalSession session, CommandContext args) throws WorldEditException {

    LocalConfiguration config = we.getConfiguration();
    double range = args.getDouble(0);

    if (range > config.maxSuperPickaxeSize) {
        BBC.TOOL_RANGE_ERROR.send(player, config.maxSuperPickaxeSize);
        return;
    }

    session.setSuperPickaxe(new RecursivePickaxe(range));
    session.enableSuperPickAxe();
    BBC.SUPERPICKAXE_AREA_ENABLED.send(player);
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:23,代码来源:SuperPickaxeCommands.java

示例3: togglePickaxe

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Command(
        aliases = {"/", ","},
        usage = "[on|off]",
        desc = "Toggle the super pickaxe function",
        min = 0,
        max = 1
)
@CommandPermissions("worldedit.superpickaxe")
public void togglePickaxe(Player player, LocalSession session, CommandContext args) throws WorldEditException {
    String newState = args.getString(0, null);
    if (session.hasSuperPickAxe()) {
        if ("on".equals(newState)) {
            BBC.SUPERPICKAXE_ENABLED.send(player);
            return;
        }

        session.disableSuperPickAxe();
        BBC.SUPERPICKAXE_DISABLED.send(player);
    } else {
        if ("off".equals(newState)) {

            BBC.SUPERPICKAXE_DISABLED.send(player);
            return;
        }
        session.enableSuperPickAxe();
        BBC.SUPERPICKAXE_ENABLED.send(player);
    }
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:29,代码来源:BrushOptionsCommands.java

示例4: single

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Command(
        aliases = {"single"},
        usage = "",
        desc = "Enable the single block super pickaxe mode",
        min = 0,
        max = 0
)
@CommandPermissions("worldedit.superpickaxe")
public void single(Player player, LocalSession session, CommandContext args) throws WorldEditException {

    session.setSuperPickaxe(new SinglePickaxe());
    session.enableSuperPickAxe();
    BBC.SUPERPICKAXE_AREA_ENABLED.send(player);
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:15,代码来源:SuperPickaxeCommands.java


注:本文中的com.sk89q.worldedit.LocalSession.enableSuperPickAxe方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。