枚举的使用
org.bukkit.Material
程序包
说明
Bukkit的常用类.
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.简化
世界
生成实现的类.参与操作玩家物品栏和物品交互的类.
代表每种体素(意义可参考维基百科或百度百科相关条目,即物品被抽象为体素)的种类和状态.
-
org.bukkit中Material的使用
修饰符和类型方法说明ChunkSnapshot.getBlockType
(int x, int y, int z) 获取区块中对应坐标方块的方块类型.static Material
Material.getMaterial
(int id) 已过时。不安全的参数static Material
Material.getMaterial
(String name) 尝试用给定名称获取Material对象.UnsafeValues.getMaterialFromInternalName
(String name) 已过时。static Material
Material.matchMaterial
(String name) 尝试用给定名称匹配Material对象.static Material
返回带有指定名称的该类型的枚举常量。static Material[]
Material.values()
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。 -
org.bukkit.block中Material的使用
修饰符和类型方法说明Jukebox.getPlaying()
获取唱片机正在播放的唱片.Block.getType()
获取此方块的种类.BlockState.getType()
Gets the type of this block state. -
org.bukkit.enchantments中Material的使用
-
org.bukkit.entity中Material的使用
修饰符和类型方法说明void
Player.decrementStatistic
(Statistic statistic, Material material) 把该玩家的统计信息中跟方块/物品有关的统计项减少一个Material
.void
Player.decrementStatistic
(Statistic statistic, Material material, int amount) 把该玩家的统计信息中跟方块/物品有关的统计项中的某Material
减少指定的值.int
HumanEntity.getCooldown
(Material material) 获取指定物品的冷却时长 (以tick为单位).int
Player.getStatistic
(Statistic statistic, Material material) 获取该玩家的统计信息中跟方块/物品有关的统计项的某Material
有多少.boolean
HumanEntity.hasCooldown
(Material material) 检查指定物品是否处于冷却状态.void
Player.incrementStatistic
(Statistic statistic, Material material) 把该玩家的统计信息中跟方块/物品有关的统计项加上一个Material
.void
Player.incrementStatistic
(Statistic statistic, Material material, int amount) 把该玩家的统计信息中跟方块/物品有关的统计项中的某Material
加上指定的值.void
Player.sendBlockChange
(Location loc, Material material, byte data) 已过时。不安全的参数void
HumanEntity.setCooldown
(Material material, int ticks) 设置指定物品的冷却时长.void
Player.setStatistic
(Statistic statistic, Material material, int newValue) 把该玩家的统计信息中的某个跟方块/物品有关的统计项中的某Material
的数量设定为某值.修饰符和类型方法说明LivingEntity.getLastTwoTargetBlocks
(Set<Material> transparent, int maxDistance) 获取沿生物实体视线上最后两个方块。LivingEntity.getLineOfSight
(Set<Material> transparent, int maxDistance) 获取沿生物实体视线上的所有方块。LivingEntity.getTargetBlock
(Set<Material> transparent, int maxDistance) 获取生物实体的目标方块。 -
org.bukkit.event.block中Material的使用
修饰符和类型方法说明BlockPhysicsEvent.getChangedType()
获取事件中被改变的方块.BlockCanBuildEvent.getMaterial()
获取我们试图放置的方块的 Material. -
org.bukkit.event.entity中Material的使用
修饰符和类型方法说明EntityChangeBlockEvent.getTo()
返回改变后的材料(Material)类 原文: Gets the Material that the block is changing into -
org.bukkit.event.inventory中Material的使用
限定符构造器说明FurnaceExtractEvent
(Player player, Block block, Material itemType, int itemAmount, int exp) -
org.bukkit.event.player中Material的使用
修饰符和类型方法说明PlayerBucketEvent.getBucket()
返回玩家手里的桶的类型.PlayerInteractEvent.getMaterial()
方便的方法, 返回由此事件表示的物品的材质 原文:Convenience method.PlayerStatisticIncrementEvent.getMaterial()
如果getStatistic()
是关于方块或物品的统计信息,获取该统计数据的物品种类,否则返回null.限定符构造器说明PlayerBucketEmptyEvent
(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand) PlayerBucketEvent
(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand) PlayerBucketFillEvent
(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand) PlayerStatisticIncrementEvent
(Player player, Statistic statistic, int initialValue, int newValue, Material material) -
org.bukkit.generator中Material的使用
修饰符和类型方法说明ChunkGenerator.ChunkData.getType
(int x, int y, int z) Get the type of the block at x, y, z. -
org.bukkit.inventory中Material的使用
修饰符和类型方法说明ShapelessRecipe.addIngredient
(int count, Material ingredient) Adds multiples of the specified ingredient.ShapelessRecipe.addIngredient
(int count, Material ingredient, int rawdata) 已过时。Magic valueShapelessRecipe.addIngredient
(Material ingredient) Adds the specified ingredient.ShapelessRecipe.addIngredient
(Material ingredient, int rawdata) 已过时。Magic value查找在物品栏内的包含指定物品的所有格子与物品堆.返回一个适用于给定的Material的ItemMetaboolean
检测这个物品栏是否含有指定的物品.boolean
检查物品栏内是否包含指定的物品,并检查物品堆的数量是否足够(译者自述).int
查找包含此物品的第一个格子.ItemFactory.getItemMeta
(Material material) 该方法能够为给定的Material
创建一个新的元数据。boolean
ItemFactory.isApplicable
(ItemMeta meta, Material material) 该方法用于检查元数据是否能够适用于指定的Material
上(如果适用则不会丢失数据).void
移除在物品栏内与给定物品匹配的所有物品堆.ShapelessRecipe.removeIngredient
(int count, Material ingredient) Removes multiple instances of an ingredient from the list.ShapelessRecipe.removeIngredient
(int count, Material ingredient, int rawdata) 已过时。Magic valueShapelessRecipe.removeIngredient
(Material ingredient) Removes an ingredient from the list.ShapelessRecipe.removeIngredient
(Material ingredient, int rawdata) 已过时。Magic valueShapedRecipe.setIngredient
(char key, Material ingredient) Sets the material that a character in the recipe shape refers to.ShapedRecipe.setIngredient
(char key, Material ingredient, int raw) 已过时。Magic value设置此冶炼配方的原料.已过时。Magic valuevoid
设置该物品的种类.限定符构造器说明FurnaceRecipe
(ItemStack result, Material source) 创建一个熔炉冶炼配方.FurnaceRecipe
(ItemStack result, Material source, int data) 已过时。不安全的参数FurnaceRecipe
(ItemStack result, Material source, int data, float experience) 已过时。不安全的参数构造一个堆叠数为1, 无附加数据的物品堆.构造指定堆叠数, 无附加数据的物品堆.构造一个具有指定损耗值(耐久度)的物品堆.已过时。该方法使用了意义不明确的data byte对象 -
org.bukkit.material中Material的使用
修饰符和类型字段说明protected static final Material
Crops.DEFAULT_TYPE
protected static final Material
Leaves.DEFAULT_TYPE
protected static final Material
Tree.DEFAULT_TYPE
protected static final Material
Wood.DEFAULT_TYPE
protected static final Material
WoodenStep.DEFAULT_TYPE
修饰符和类型方法说明MaterialData.getItemType()
获取这个MaterialData代表的Material.TexturedMaterial.getMaterial()
获取这个方块是由什么物品制成的。static Material
Door.getWoodDoorOfSpecies
(TreeSpecies species) Returns the item type of a wooden door for the given tree species.修饰符和类型方法说明MonsterEggs.getTextures()
SmoothBrick.getTextures()
Step.getTextures()
TexturedMaterial.getTextures()
检索可能的材质列表.列表的第一个元素将用来作为缺省值.限定符构造器说明已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数Comparator
(Material type) Comparator
(Material type, byte data) 已过时。不安全的参数构造一个处于播种阶段的给定类型的农作物.已过时。不安全的参数构造一个处于给定生长阶段的给定类型的农作物方块.DetectorRail
(Material type) DetectorRail
(Material type, byte data) 已过时。不安全的参数已过时。不安全的参数DirectionalContainer
(Material type) DirectionalContainer
(Material 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 closed已过时。不安全的参数EnderChest
(Material type) EnderChest
(Material type, byte data) 已过时。不安全的参数ExtendedRails
(Material type) ExtendedRails
(Material type, byte data) 已过时。不安全的参数已过时。已过时。不安全的参数已过时。不安全的参数FurnaceAndDispenser
(Material type) FurnaceAndDispenser
(Material type, byte data) 已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数Constructs a leaf block of the given type.已过时。不安全的参数Leaves
(Material type, TreeSpecies species) Constructs a leaf block of the given type and tree species.Leaves
(Material type, TreeSpecies species, boolean isDecayable) Constructs a leaf block of the given type and tree species and flag for whether this leaf block will disappear when too far from a log.已过时。不安全的参数已过时。不安全的参数MaterialData
(Material type) MaterialData
(Material type, byte data) 已过时。不安全的参数MonsterEggs
(Material type) MonsterEggs
(Material type, byte data) 已过时。不安全的参数Constructs a brown/red mushroom block with all sides set to pores.已过时。Magic valueConstructs a brown/red mushroom cap block with the specified face or faces set to cap texture.Mushroom
(Material shroom, MushroomBlockTexture texture) Constructs a brown/red mushroom block with the specified textures.NetherWarts
(Material type) NetherWarts
(Material type, byte data) 已过时。不安全的参数已过时。Magic valuePistonBaseMaterial
(Material type) PistonBaseMaterial
(Material type, byte data) 已过时。不安全的参数PistonExtensionMaterial
(Material type, byte data) 已过时。不安全的参数PoweredRail
(Material type) PoweredRail
(Material type, byte data) 已过时。不安全的参数PressurePlate
(Material type) PressurePlate
(Material type, byte data) 已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数RedstoneTorch
(Material type) RedstoneTorch
(Material type, byte data) 已过时。不安全的参数RedstoneWire
(Material type) RedstoneWire
(Material type, byte data) 已过时。不安全的参数已过时。不安全的参数以给定的物品种类构造本类.已过时。不安全的参数Sapling
(Material type, TreeSpecies species) 以给定的物品种类和树木种类构造本类.Sapling
(Material type, TreeSpecies species, boolean isInstantGrowable) 以给定的物品种类和树木种类和是否瞬间长大构造本类.已过时。不安全的参数SimpleAttachableMaterialData
(Material type, byte data) 已过时。不安全的参数SimpleAttachableMaterialData
(Material type, BlockFace direction) 已过时。不安全的参数SmoothBrick
(Material type) SmoothBrick
(Material type, byte data) 已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数TexturedMaterial
(Material type, byte data) 已过时。不安全的参数已过时。不安全的参数已过时。不安全的参数Constructs a tree block of the given type.已过时。不安全的参数Tree
(Material type, TreeSpecies species) Constructs a tree block of the given type and tree species.Tree
(Material type, TreeSpecies species, BlockFace dir) Constructs a tree block of the given type and tree species, and facing the given direction.以给定的物品种类构造本类.已过时。不安全的参数Wood
(Material type, TreeSpecies species) 以给定的物品种类和树木种类构造本类.WoodenStep
(Material type, byte data) 已过时。不安全的参数已过时。不安全的参数