Package me.taylorkelly.bigbrother.datablock

Examples of me.taylorkelly.bigbrother.datablock.PlacedBlock


            BBLogging.debug("onBlockPlace");
            Block block = event.getBlockPlaced();
            if (block.getType() == Material.LAVA || block.getType() == Material.STATIONARY_LAVA) {
                LavaFlowLogger.log(block, player.getName());
            }
            PlacedBlock dataBlock = new PlacedBlock(player.getName(), block, block.getWorld().getName());
            dataBlock.send();
        }
    }
View Full Code Here


            } else if (BBSettings.blockPlace && pi.getWatched()) {
                int x;
                int y;
                int z;
                int type;
                PlacedBlock dataBlock;
                World world;
                Block block = event.getClickedBlock();
               
                plugin.closeChestIfOpen(pi);
                if(block.getState() instanceof Chest) {
                    Chest chest = ((Chest)block.getState());
                    // OH SHI-
                    BBUsersTable.getInstance().userOpenedChest(player.getName(),chest,chest.getInventory().getContents());
                    return;
                }
                switch (event.getMaterial()) {
                //TODO Door logging
                case LAVA_BUCKET:
                    x = event.getClickedBlock().getX() + event.getBlockFace().getModX();
                    y = event.getClickedBlock().getY() + event.getBlockFace().getModY();
                    z = event.getClickedBlock().getZ() + event.getBlockFace().getModZ();
                    type = Material.LAVA.getId();
                    world = event.getClickedBlock().getWorld();
                    dataBlock = new PlacedBlock(event.getPlayer().getName(), world.getName(), x, y, z, type, (byte) 0);
                    LavaFlowLogger.log(new Location(world, x, y, z), event.getPlayer().getName());
                    dataBlock.send();
                    break;
                case WATER_BUCKET:
                    x = event.getClickedBlock().getX() + event.getBlockFace().getModX();
                    y = event.getClickedBlock().getY() + event.getBlockFace().getModY();
                    z = event.getClickedBlock().getZ() + event.getBlockFace().getModZ();
                    type = Material.WATER.getId();
                    world = event.getClickedBlock().getWorld();
                    dataBlock = new PlacedBlock(event.getPlayer().getName(), world.getName(), x, y, z, type, (byte) 0);
                    dataBlock.send();
                    break;
                case SIGN:
                    x = event.getClickedBlock().getX() + event.getBlockFace().getModX();
                    y = event.getClickedBlock().getY() + event.getBlockFace().getModY();
                    z = event.getClickedBlock().getZ() + event.getBlockFace().getModZ();
                    world = event.getClickedBlock().getWorld();
                   
                    int data = 0;
                    switch (event.getBlockFace()) {
                    case UP:
                        type = Material.SIGN_POST.getId();
                        break;
                    case NORTH:
                        data = 4;
                        type = Material.WALL_SIGN.getId();
                        break;
                    case SOUTH:
                        data = 5;
                        type = Material.WALL_SIGN.getId();
                        break;
                    case EAST:
                        data = 2;
                        type = Material.WALL_SIGN.getId();
                        break;
                    case WEST:
                        data = 3;
                        type = Material.WALL_SIGN.getId();
                        break;
                    default:
                        type = Material.SIGN.getId();
                    }
                    dataBlock = new PlacedBlock(event.getPlayer().getName(), world.getName(), x, y, z, type, (byte) data);
                    dataBlock.send();
                    break;
                case BUCKET:
                    BrokenBlock dataBlock2;
                    world = event.getClickedBlock().getWorld();
                    switch (event.getClickedBlock().getType()) {
View Full Code Here

TOP

Related Classes of me.taylorkelly.bigbrother.datablock.PlacedBlock

Copyright © 2018 www.massapicom. 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.