类 Door
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Door
- 所有已实现的接口:
Cloneable
,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
-
构造器概要
构造器说明Door()
已过时。Door
(int type) 已过时。不安全的参数Door
(int type, byte data) 已过时。不安全的参数Constructs the top half of door of the given material type and with the hinge on the left or right已过时。不安全的参数构造一个Constructs the bottom half of a door of the given material type, facing the specified direction and set to open or closedDoor
(TreeSpecies species, boolean isHingeRight) Constructs the top half of a wooden door of the given species and with the hinge on the left or rightDoor
(TreeSpecies species, BlockFace face) Constructs the bottom half of a wooden door of the given species, facing the specified direction and set to closedDoor
(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 -
方法概要
修饰符和类型方法说明clone()
Get the direction that this door is facing.boolean
getHinge()
Returns the side of the door the hinge is on.已过时。This method should not be used; use hinge and facing accessors instead.static Material
getWoodDoorOfSpecies
(TreeSpecies species) Returns the item type of a wooden door for the given tree species.boolean
isOpen()
Result is undefined ifisTopHalf()
is true.boolean
void
setFacingDirection
(BlockFace face) 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 halftoString()
从类继承的方法 org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
构造器详细资料
-
Door
已过时。Artifact of old API, equivalent to newDoor(Material.WOODEN_DOOR);
-
Door
已过时。不安全的参数- 参数:
type
- the raw type id
-
Door
-
Door
构造一个原文: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
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
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
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
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
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
已过时。不安全的参数- 参数:
type
- the raw type iddata
- the raw data value
-
Door
已过时。不安全的参数- 参数:
type
- the typedata
- the raw data value
-
-
方法详细资料
-
getWoodDoorOfSpecies
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 ifisTopHalf()
is true. -
setOpen
public void setOpen(boolean isOpen) Set whether the door is open. Undefined ifisTopHalf()
is true. -
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
已过时。This method should not be used; use hinge and facing accessors instead.- 返回:
- BlockFace.SELF
-
toString
- 覆盖:
toString
在类中MaterialData
-
setFacingDirection
Set the direction that this door should is facing. Undefined ifisTopHalf()
is true.- 指定者:
setFacingDirection
在接口中Directional
- 参数:
face
- the direction
-
getFacing
Get the direction that this door is facing. Undefined ifisTopHalf()
is true.- 指定者:
getFacing
在接口中Directional
- 返回:
- the direction
-
getHinge
public boolean getHinge()Returns the side of the door the hinge is on. Undefined ifisTopHalf()
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 ifisTopHalf()
is false.- 参数:
isHingeRight
- True if the hinge is on the right hand side, false if the hinge is on the left hand side.
-
clone
- 覆盖:
clone
在类中MaterialData
-
Door(Material.WOODEN_DOOR);