Package org.bukkit.material

Examples of org.bukkit.material.Door


      if(g.isOpen())
        inData.setValid(true);
    }
    else if(inData.getAboveBlock().getType() == Material.WOOD_DOOR || (!this.m_ironDoor && inData.getAboveBlock().getType() == Material.IRON_DOOR_BLOCK))
    {
      Door d = (Door)inData.getAboveBlock().getState().getData();
      if(d.isOpen())
        inData.setValid(true);
    }
  }
View Full Code Here


        this.altState = null;
        this.setBlockLocation(new BlockLocation(block.getLocation()));
       
        if (update)
          if(state.getData() instanceof Door) {
              Door door = (Door)state.getData();
              Block topHalf;
              Block bottomHalf;
              if(door.isTopHalf()) {
                  topHalf = block;
                  bottomHalf = block.getRelative(BlockFace.DOWN);
              } else {
                  bottomHalf = block;
                  topHalf = block.getRelative(BlockFace.UP);
View Full Code Here

    }
   
    public void replaceProtections() {
        Block block = state.getBlock();
        if(state.getData() instanceof Door) {
            Door door = (Door)state.getData();
            Block topHalf;
            Block bottomHalf;
            if(door.isTopHalf()) {
                topHalf = block;
                bottomHalf = block.getRelative(BlockFace.DOWN);
            } else {
                bottomHalf = block;
                topHalf = block.getRelative(BlockFace.UP);
            }
            door.setTopHalf(true);
            topHalf.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
            door.setTopHalf(false);
            bottomHalf.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
        } else if(state instanceof Sign) {
            block.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
            Sign sign = (Sign)block.getState();
            int i = 0;
View Full Code Here

TOP

Related Classes of org.bukkit.material.Door

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.