Examples of dCuboid


Examples of net.aufdemrand.denizen.objects.dCuboid

    @Override
    public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {

        dLocation copy_location = (dLocation) scriptEntry.getObject("location");
        dLocation destination = (dLocation) scriptEntry.getObject("destination");
        dCuboid copy_cuboid = (dCuboid) scriptEntry.getObject("cuboid");
        Element remove_original = (Element) scriptEntry.getObject("remove"); // TODO: Implement?


        List<Location> locations = new ArrayList<Location>();

        if (copy_location != null) locations.add(copy_location);
        else if (copy_cuboid != null) locations.addAll(copy_cuboid.getBlockLocations());


        for (Location loc : locations) {

            Block source = copy_location.getBlock();
View Full Code Here

Examples of net.aufdemrand.denizen.objects.dCuboid

    @EventHandler
    public void locationTags(ReplaceableTagEvent event) {

        if (!event.matches("cuboid") || event.replaced()) return;

        dCuboid cuboid = null;

        String context = event.getNameContext();
        if (event.hasNameContext() && dCuboid.matches(context))
            cuboid = dCuboid.valueOf(context);

        // Check if cuboid is null, return null if it is
        if (cuboid == null) {
            return;
        }

        // Build and fill attributes
        Attribute attribute = event.getAttributes();
        event.setReplaced(cuboid.getAttribute(attribute.fulfill(1)));

    }
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.