Examples of canUse()


Examples of com.sk89q.worldedit.command.tool.BlockTool.canUse()

                    return;
                }

                if (player.isHoldingPickAxe() && session.hasSuperPickAxe()) {
                    final BlockTool superPickaxe = session.getSuperPickaxe();
                    if (superPickaxe != null && superPickaxe.canUse(player)) {
                        event.setCancelled(superPickaxe.actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location));
                        return;
                    }
                }
View Full Code Here

Examples of com.sk89q.worldedit.command.tool.Tool.canUse()

                    }
                }

                Tool tool = session.getTool(player.getItemInHand());
                if (tool != null && tool instanceof DoubleActionBlockTool) {
                    if (tool.canUse(player)) {
                        ((DoubleActionBlockTool) tool).actSecondary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location);
                        event.setCancelled(true);
                    }
                }
View Full Code Here

Examples of com.sk89q.worldedit.command.tool.Tool.canUse()

                    return;
                }

                Tool tool = session.getTool(player.getItemInHand());
                if (tool != null && tool instanceof BlockTool) {
                    if (tool.canUse(player)) {
                        ((BlockTool) tool).actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session, location);
                        event.setCancelled(true);
                    }
                }
            }
View Full Code Here

Examples of com.sk89q.worldedit.command.tool.Tool.canUse()

                LocalSession session = worldEdit.getSessionManager().get(player);

                Tool tool = session.getTool(player.getItemInHand());
                if (tool != null && tool instanceof DoubleActionTraceTool) {
                    if (tool.canUse(player)) {
                        ((DoubleActionTraceTool) tool).actSecondary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session);
                        event.setCancelled(true);
                        return;
                    }
                }
View Full Code Here

Examples of com.sk89q.worldedit.command.tool.Tool.canUse()

                LocalSession session = worldEdit.getSessionManager().get(player);

                Tool tool = session.getTool(player.getItemInHand());
                if (tool != null && tool instanceof TraceTool) {
                    if (tool.canUse(player)) {
                        ((TraceTool) tool).actPrimary(queryCapability(Capability.WORLD_EDITING), getConfiguration(), player, session);
                        event.setCancelled(true);
                        return;
                    }
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.