Package org.bukkit.block

Examples of org.bukkit.block.BlockState.update()


    current.setData(mainData);
    current.update(true);
    current = this.warzone.getWorld().getBlockAt(x, y, z + 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);

    current = this.warzone.getWorld().getBlockAt(x, y + 1, z - 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
View Full Code Here


    current.update(true);

    current = this.warzone.getWorld().getBlockAt(x, y + 1, z - 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
    current = this.warzone.getWorld().getBlockAt(x, y + 1, z + 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
View Full Code Here

    current.setData(mainData);
    current.update(true);
    current = this.warzone.getWorld().getBlockAt(x, y + 1, z + 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);

    current = this.warzone.getWorld().getBlockAt(x, y + 2, z).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
View Full Code Here

    current.update(true);

    current = this.warzone.getWorld().getBlockAt(x, y + 2, z).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
    current = this.warzone.getWorld().getBlockAt(x, y + 2, z - 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
    current = this.warzone.getWorld().getBlockAt(x, y + 2, z + 1).getState();
View Full Code Here

    current.setData(mainData);
    current.update(true);
    current = this.warzone.getWorld().getBlockAt(x, y + 2, z - 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
    current = this.warzone.getWorld().getBlockAt(x, y + 2, z + 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
  }
View Full Code Here

    current.setData(mainData);
    current.update(true);
    current = this.warzone.getWorld().getBlockAt(x, y + 2, z + 1).getState();
    current.setType(main);
    current.setData(mainData);
    current.update(true);
  }

  public boolean isNear(Location playerLocation) {
    int x = this.location.getBlockX();
    int y = this.location.getBlockY();
View Full Code Here

          currentGateBlock.getRelative(back, 2).getRelative(left, 2).getRelative(BlockFace.UP, 2).setType(Material.AIR);
         
          BlockState cgbdl = currentGateBlock.getRelative(BlockFace.DOWN).getState();
          cgbdl.setType(War.war.getWarhubMaterials().getLightBlock().getType());
          cgbdl.setData(War.war.getWarhubMaterials().getLightBlock().getData());
          cgbdl.update(true);
          // gate blocks
          Block[] gateBlocks = {
              currentGateBlock.getRelative(left),
              currentGateBlock.getRelative(right).getRelative(BlockFace.UP),
              currentGateBlock.getRelative(left).getRelative(BlockFace.UP).getRelative(BlockFace.UP),
View Full Code Here

              };
          for (Block gateBlock : gateBlocks) {
            BlockState gb = gateBlock.getState();
            gb.setType(War.war.getWarhubMaterials().getGateBlock().getType());
            gb.setData(War.war.getWarhubMaterials().getGateBlock().getData());
            gb.update(true);
          }
          currentGateBlock = currentGateBlock.getRelative(right, 4);
        }
      }
View Full Code Here

        zoneGate.getRelative(BlockFace.UP, 2).getRelative(left.getOppositeFace()).getRelative(back, 1).setType(Material.AIR);
       
        BlockState topLeftGateBlock = zoneGate.getRelative(BlockFace.UP, 2).getRelative(left).getState();
        topLeftGateBlock.setType(War.war.getWarhubMaterials().getGateBlock().getType());
        topLeftGateBlock.setData(War.war.getWarhubMaterials().getGateBlock().getData());
        topLeftGateBlock.update(true);
       
        BlockState topRightGateBlock = zoneGate.getRelative(BlockFace.UP, 2).getRelative(left.getOppositeFace()).getState();
        topRightGateBlock.setType(War.war.getWarhubMaterials().getGateBlock().getType());
        topRightGateBlock.setData(War.war.getWarhubMaterials().getGateBlock().getData());
        topRightGateBlock.update(true);
View Full Code Here

        topLeftGateBlock.update(true);
       
        BlockState topRightGateBlock = zoneGate.getRelative(BlockFace.UP, 2).getRelative(left.getOppositeFace()).getState();
        topRightGateBlock.setType(War.war.getWarhubMaterials().getGateBlock().getType());
        topRightGateBlock.setData(War.war.getWarhubMaterials().getGateBlock().getData());
        topRightGateBlock.update(true);
      }
    } else {
      War.war.log("Failed to find warhub gate for " + zone.getName() + " warzone.", Level.WARNING);
    }
  }
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.