类 Door

所有已实现的接口:
Cloneable, Directional, Openable

public class Door extends MaterialData implements Directional, Openable
代表门 这个类在以前被弃用,但现已经能与当今的门工作.由于Minecraft的门的内部表示,依赖于isTopHalf()的一些方法未被定义.
另请参阅:
  • Material.WOODEN_DOOR
  • Material.IRON_DOOR_BLOCK
  • Material.SPRUCE_DOOR
  • Material.BIRCH_DOOR
  • Material.JUNGLE_DOOR
  • Material.ACACIA_DOOR
  • Material.DARK_OAK_DOOR
  • 构造器概要

    构造器
    构造器
    说明
    已过时。
    Artifact of old API, equivalent to new Door(Material.WOODEN_DOOR);
    Door(int type)
    已过时。
    不安全的参数
    Door(int type, byte data)
    已过时。
    不安全的参数
    Door(Material type)
     
    Door(Material type, boolean isHingeRight)
    Constructs the top half of door of the given material type and with the hinge on the left or right
    Door(Material type, byte data)
    已过时。
    不安全的参数
    Door(Material type, BlockFace face)
    构造一个
    Door(Material type, BlockFace face, boolean isOpen)
    Constructs the bottom half of a door of the given material type, facing the specified direction and set to open or closed
    Door(TreeSpecies species, boolean isHingeRight)
    Constructs the top half of a wooden door of the given species and with the hinge on the left or right
    Door(TreeSpecies species, BlockFace face)
    Constructs the bottom half of a wooden door of the given species, facing the specified direction and set to closed
    Door(TreeSpecies species, BlockFace face, boolean isOpen)
    Constructs the bottom half of a wooden door of the given species, facing the specified direction and set to open or closed
  • 方法概要

    修饰符和类型
    方法
    说明
     
    Get the direction that this door is facing.
    boolean
    Returns the side of the door the hinge is on.
    已过时。
    This method should not be used; use hinge and facing accessors instead.
    static Material
    Returns the item type of a wooden door for the given tree species.
    boolean
    Result is undefined if isTopHalf() is true.
    boolean
     
    void
    Set the direction that this door should is facing.
    void
    setHinge(boolean isHingeRight)
    Set whether the hinge is on the left or right side.
    void
    setOpen(boolean isOpen)
    Set whether the door is open.
    void
    setTopHalf(boolean isTopHalf)
    Configure this part of the door to be either the top or the bottom half
     

    从类继承的方法 org.bukkit.material.MaterialData

    equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack

    从类继承的方法 java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • 构造器详细资料

    • Door

      @Deprecated public Door()
      已过时。
      Artifact of old API, equivalent to new Door(Material.WOODEN_DOOR);
    • Door

      @Deprecated public Door(int type)
      已过时。
      不安全的参数
      参数:
      type - the raw type id
    • Door

      public Door(Material type)
    • Door

      public Door(Material type, BlockFace face)
      构造一个

      原文:Constructs the bottom half of a door of the given material type, facing the specified direction and set to closed

      参数:
      type - The type of material this door is made of. This must match the type of the block above.
      face - The direction the door is facing.
      另请参阅:
      • Material.WOODEN_DOOR
      • Material.IRON_DOOR_BLOCK
      • Material.SPRUCE_DOOR
      • Material.BIRCH_DOOR
      • Material.JUNGLE_DOOR
      • Material.ACACIA_DOOR
      • Material.DARK_OAK_DOOR
      • BlockFace.WEST
      • BlockFace.NORTH
      • BlockFace.EAST
      • BlockFace.SOUTH
    • Door

      public Door(Material type, BlockFace face, boolean isOpen)
      Constructs the bottom half of a door of the given material type, facing the specified direction and set to open or closed
      参数:
      type - The type of material this door is made of. This must match the type of the block above.
      face - The direction the door is facing.
      isOpen - Whether the door is currently opened.
      另请参阅:
      • Material.WOODEN_DOOR
      • Material.IRON_DOOR_BLOCK
      • Material.SPRUCE_DOOR
      • Material.BIRCH_DOOR
      • Material.JUNGLE_DOOR
      • Material.ACACIA_DOOR
      • Material.DARK_OAK_DOOR
      • BlockFace.WEST
      • BlockFace.NORTH
      • BlockFace.EAST
      • BlockFace.SOUTH
    • Door

      public Door(Material type, boolean isHingeRight)
      Constructs the top half of door of the given material type and with the hinge on the left or right
      参数:
      type - The type of material this door is made of. This must match the type of the block below.
      isHingeRight - True if the hinge is on the right hand side, false if the hinge is on the left hand side.
      另请参阅:
      • Material.WOODEN_DOOR
      • Material.IRON_DOOR_BLOCK
      • Material.SPRUCE_DOOR
      • Material.BIRCH_DOOR
      • Material.JUNGLE_DOOR
      • Material.ACACIA_DOOR
      • Material.DARK_OAK_DOOR
    • Door

      public Door(TreeSpecies species, BlockFace face)
      Constructs the bottom half of a wooden door of the given species, facing the specified direction and set to closed
      参数:
      species - The species this wooden door is made of. This must match the species of the block above.
      face - The direction the door is facing.
      另请参阅:
      • TreeSpecies
      • BlockFace.WEST
      • BlockFace.NORTH
      • BlockFace.EAST
      • BlockFace.SOUTH
    • Door

      public Door(TreeSpecies species, BlockFace face, boolean isOpen)
      Constructs the bottom half of a wooden door of the given species, facing the specified direction and set to open or closed
      参数:
      species - The species this wooden door is made of. This must match the species of the block above.
      face - The direction the door is facing.
      isOpen - Whether the door is currently opened.
      另请参阅:
      • TreeSpecies
      • BlockFace.WEST
      • BlockFace.NORTH
      • BlockFace.EAST
      • BlockFace.SOUTH
    • Door

      public Door(TreeSpecies species, boolean isHingeRight)
      Constructs the top half of a wooden door of the given species and with the hinge on the left or right
      参数:
      species - The species this wooden door is made of. This must match the species of the block below.
      isHingeRight - True if the hinge is on the right hand side, false if the hinge is on the left hand side.
      另请参阅:
    • Door

      @Deprecated public Door(int type, byte data)
      已过时。
      不安全的参数
      参数:
      type - the raw type id
      data - the raw data value
    • Door

      @Deprecated public Door(Material type, byte data)
      已过时。
      不安全的参数
      参数:
      type - the type
      data - the raw data value
  • 方法详细资料

    • getWoodDoorOfSpecies

      public static Material getWoodDoorOfSpecies(TreeSpecies species)
      Returns the item type of a wooden door for the given tree species.
      参数:
      species - The species of wood door required.
      返回:
      The item type for the given species.
      另请参阅:
      • Material.WOODEN_DOOR
      • Material.SPRUCE_DOOR
      • Material.BIRCH_DOOR
      • Material.JUNGLE_DOOR
      • Material.ACACIA_DOOR
      • Material.DARK_OAK_DOOR
    • isOpen

      public boolean isOpen()
      Result is undefined if isTopHalf() is true.
      指定者:
      isOpen 在接口中 Openable
      返回:
      门是否开着
    • setOpen

      public void setOpen(boolean isOpen)
      Set whether the door is open. Undefined if isTopHalf() is true.
      指定者:
      setOpen 在接口中 Openable
      参数:
      isOpen - 门是否开着
    • isTopHalf

      public boolean isTopHalf()
      返回:
      whether this is the top half of the door
    • setTopHalf

      public void setTopHalf(boolean isTopHalf)
      Configure this part of the door to be either the top or the bottom half
      参数:
      isTopHalf - True to make it the top half.
    • getHingeCorner

      @Deprecated public BlockFace getHingeCorner()
      已过时。
      This method should not be used; use hinge and facing accessors instead.
      返回:
      BlockFace.SELF
    • toString

      public String toString()
      覆盖:
      toString 在类中 MaterialData
    • setFacingDirection

      public void setFacingDirection(BlockFace face)
      Set the direction that this door should is facing. Undefined if isTopHalf() is true.
      指定者:
      setFacingDirection 在接口中 Directional
      参数:
      face - the direction
    • getFacing

      public BlockFace getFacing()
      Get the direction that this door is facing. Undefined if isTopHalf() is true.
      指定者:
      getFacing 在接口中 Directional
      返回:
      the direction
    • getHinge

      public boolean getHinge()
      Returns the side of the door the hinge is on. Undefined if isTopHalf() is false.
      返回:
      false for left hinge, true for right hinge
    • setHinge

      public void setHinge(boolean isHingeRight)
      Set whether the hinge is on the left or right side. Left is false, right is true. Undefined if isTopHalf() is false.
      参数:
      isHingeRight - True if the hinge is on the right hand side, false if the hinge is on the left hand side.
    • clone

      public Door clone()
      覆盖:
      clone 在类中 MaterialData