类 Door
- 所有已实现的接口:
Cloneable,Directional,Openable
这个类曾被弃用,但已被重构以适用于现今的门. (然后又愉快的弃用了...) 由于Minecraft的门的内部表示,依赖于isTopHalf()的一些方法未被定义.
关于朝向:这个朝向一般是玩家放置门时他面对的方向. 比如我朝西方放置一个门,它的朝向(技术上讲它的"facing"数据值就是west)是朝西,那么关门时门轴是朝东方向转.
-
构造器概要
构造器构造器说明Door()已过时。遗留的旧API,相当于newDoor(Material.LEGACY_WOODEN_DOOR);已过时。已过时。以指定材质和门轴的左右侧构造门的上半部分.已过时。不安全的参数已过时。以指定材质和朝向构造门的下半部分(关着的门).已过时。以指定材质和朝向构造门的下半部分,并设置这个门关着还是开着.Door(TreeSpecies species, boolean isHingeRight) 已过时。以指定树种和朝向构造门的上半部分,并指定门轴在左侧还是右侧.Door(TreeSpecies species, BlockFace face) 已过时。以指定树种和朝向构造一个木门的下半部分(关着的门).Door(TreeSpecies species, BlockFace face, boolean isOpen) 已过时。以指定树种和朝向构造门的下半部分,并设置这个门关着还是开着. -
方法概要
修饰符和类型方法说明clone()已过时。已过时。获取门的朝向.booleangetHinge()已过时。返回门轴在哪一侧.已过时。不应使用此方法;请使用hinge/facing对应的getterstatic MaterialgetWoodDoorOfSpecies(TreeSpecies species) 已过时。返回用你给定的树种做成的木门的物品.booleanisOpen()已过时。若isTopHalf()为true,则得不到结果(个人猜测总得返回false).boolean已过时。voidsetFacingDirection(BlockFace face) 已过时。设置门的朝向.voidsetHinge(boolean isHingeRight) 已过时。设置门轴在左侧还是右侧.左侧为false,右侧为true.voidsetOpen(boolean isOpen) 已过时。设置门是否开着.若isTopHalf()为true则此方法没有效果.voidsetTopHalf(boolean isTopHalf) 已过时。设置这个门是上半部分的还是下半部分的.toString()已过时。从类继承的方法 org.bukkit.material.MaterialData
equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack
-
构造器详细资料
-
Door
已过时。遗留的旧API,相当于newDoor(Material.LEGACY_WOODEN_DOOR); -
Door
已过时。 -
Door
已过时。以指定材质和朝向构造门的下半部分(关着的门).原文:Constructs the bottom half of a door of the given material type, facing the specified direction and set to closed
- 参数:
type- 这个门是用什么材料做成的.必须和这个门的上半部分相同.face- 门的朝向.- 另请参阅:
-
Door
已过时。以指定材质和朝向构造门的下半部分,并设置这个门关着还是开着.原文:Constructs the bottom half of a door of the given material type, facing the specified direction and set to open or closed
- 参数:
type- 这个门是用什么材料做成的.必须和这个门的上半部分相同.face- 门的朝向isOpen- 这个门是否开着- 另请参阅:
-
Door
已过时。以指定材质和门轴的左右侧构造门的上半部分.原文:Constructs the top half of door of the given material type and with the hinge on the left or right
- 参数:
type- 这个门是用什么材料做成的.必须和这个门的下半部分相同.isHingeRight- 门轴在右侧为true,在左侧为false- 另请参阅:
-
Door
已过时。以指定树种和朝向构造一个木门的下半部分(关着的门).原文:Constructs the bottom half of a wooden door of the given species, facing the specified direction and set to closed
- 参数:
species- 这个木门是用什么树种做成的.必须和这个门的上半部分相同.face- 门的朝向- 另请参阅:
-
Door
已过时。以指定树种和朝向构造门的下半部分,并设置这个门关着还是开着.原文:Constructs the bottom half of a wooden door of the given species, facing the specified direction and set to open or closed
- 参数:
species- 这个木门是用什么树种做成的.必须和这个门的上半部分相同.face- 门的朝向isOpen- 门是否开着- 另请参阅:
-
Door
已过时。以指定树种和朝向构造门的上半部分,并指定门轴在左侧还是右侧.原文:Constructs the top half of a wooden door of the given species and with the hinge on the left or right
- 参数:
species- 这个木门是用什么树种做成的.必须和这个门的下半部分相同.isHingeRight- 门轴在右侧为true,在左侧为false- 另请参阅:
-
Door
已过时。不安全的参数- 参数:
type- the typedata- the raw data value
-
-
方法详细资料
-
getWoodDoorOfSpecies
已过时。返回用你给定的树种做成的木门的物品.原文:Returns the item type of a wooden door for the given tree species.
- 参数:
species- 树的物种- 返回:
- 用这种树做成的木门
- 另请参阅:
-
isOpen
public boolean isOpen()已过时。若isTopHalf()为true,则得不到结果(个人猜测总得返回false).原文:Result is undefined if
isTopHalf()is true. -
setOpen
public void setOpen(boolean isOpen) 已过时。设置门是否开着.若isTopHalf()为true则此方法没有效果.原文:Set whether the door is open. Undefined if
isTopHalf()is true. -
isTopHalf
public boolean isTopHalf()已过时。- 返回:
- 这个门是否属于上半部分
-
setTopHalf
public void setTopHalf(boolean isTopHalf) 已过时。设置这个门是上半部分的还是下半部分的.原文:Configure this part of the door to be either the top or the bottom half
- 参数:
isTopHalf- true将设此门为上半部分的
-
getHingeCorner
已过时。不应使用此方法;请使用hinge/facing对应的getter- 返回:
- BlockFace.SELF
-
toString
已过时。- 覆盖:
toString在类中MaterialData
-
setFacingDirection
已过时。设置门的朝向. 若isTopHalf()为true,则没有效果.原文:Set the direction that this door should is facing. Undefined if
isTopHalf()is true.- 指定者:
setFacingDirection在接口中Directional- 参数:
face- 朝向
-
getFacing
已过时。获取门的朝向. 若isTopHalf()为true,则没有效果.原文:Get the direction that this door is facing. Undefined if
isTopHalf()is true.- 指定者:
getFacing在接口中Directional- 返回:
- 朝向
-
getHinge
public boolean getHinge()已过时。返回门轴在哪一侧. 若isTopHalf()为false,则没有效果.原文:Returns the side of the door the hinge is on. Undefined if
isTopHalf()is false.- 返回:
- 门轴在右侧为true,在左侧为false
-
setHinge
public void setHinge(boolean isHingeRight) 已过时。设置门轴在左侧还是右侧.左侧为false,右侧为true. 若isTopHalf()为false,则没有效果.原文:Set whether the hinge is on the left or right side. Left is false, right is true. Undefined if
isTopHalf()is false.- 参数:
isHingeRight- 门轴在右侧为true,在左侧为false
-
clone
已过时。- 覆盖:
clone在类中MaterialData
-
BlockData.