本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例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);
}