程序包 | 说明 |
---|---|
org.bukkit |
Bukkit的常用类.
|
org.bukkit.block |
用于操作在
世界 内的三位像素(方块),包括一些特定的状态. |
org.bukkit.enchantments | |
org.bukkit.entity |
为在
世界 内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等. |
org.bukkit.event.block | |
org.bukkit.event.entity | |
org.bukkit.event.inventory | |
org.bukkit.event.player | |
org.bukkit.generator |
简化
世界 生成实现的类. |
org.bukkit.inventory |
参与操作玩家物品栏和物品交互的类.
|
org.bukkit.material |
代表每种体素(意义可参考维基百科或百度百科相关条目,即物品被抽象为体素)的种类和状态.
|
限定符和类型 | 方法和说明 |
---|---|
Material |
ChunkSnapshot.getBlockType(int x,
int y,
int z)
获取区块中对应坐标方块的方块类型.
|
static Material |
Material.getMaterial(int id)
已过时。
不安全的参数
|
static Material |
Material.getMaterial(java.lang.String name)
尝试用给定名称获取Material对象.
|
Material |
UnsafeValues.getMaterialFromInternalName(java.lang.String name)
已过时。
|
static Material |
Material.matchMaterial(java.lang.String name)
尝试用给定名称匹配Material对象.
|
static Material |
Material.valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static Material[] |
Material.values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
限定符和类型 | 方法和说明 |
---|---|
FallingBlock |
World.spawnFallingBlock(Location location,
Material material,
byte data)
已过时。
不安全的参数
|
限定符和类型 | 方法和说明 |
---|---|
Material |
Jukebox.getPlaying()
获取唱片机正在播放的唱片.
|
Material |
BlockState.getType()
Gets the type of this block state.
|
Material |
Block.getType()
获取此方块的种类.
|
限定符和类型 | 方法和说明 |
---|---|
void |
Jukebox.setPlaying(Material record)
设置正在播放的唱片.
|
void |
BlockState.setType(Material type)
Sets the type of this block state.
|
void |
Block.setType(Material type)
设置这个方块的类型.
|
void |
Block.setType(Material type,
boolean applyPhysics)
Sets the type of this block
|
限定符和类型 | 方法和说明 |
---|---|
abstract boolean |
EnchantmentTarget.includes(Material item)
检查是否包含该物品类型.
|
限定符和类型 | 方法和说明 |
---|---|
Material |
FallingBlock.getMaterial()
Get the Material of the falling block
|
限定符和类型 | 方法和说明 |
---|---|
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 的数量设定为某值. |
限定符和类型 | 方法和说明 |
---|---|
java.util.List<Block> |
LivingEntity.getLastTwoTargetBlocks(java.util.Set<Material> transparent,
int maxDistance)
获取沿生物实体视线上最后两个方块。
|
java.util.List<Block> |
LivingEntity.getLineOfSight(java.util.Set<Material> transparent,
int maxDistance)
获取沿生物实体视线上的所有方块。
|
Block |
LivingEntity.getTargetBlock(java.util.Set<Material> transparent,
int maxDistance)
获取生物实体的目标方块。
|
限定符和类型 | 方法和说明 |
---|---|
Material |
BlockPhysicsEvent.getChangedType()
获取事件中被改变的方块.
|
Material |
BlockCanBuildEvent.getMaterial()
获取我们试图放置的方块的 Material.
|
限定符和类型 | 方法和说明 |
---|---|
Material |
EntityChangeBlockEvent.getTo()
返回改变后的材料(Material)类
原文:
Gets the Material that the block is changing into
|
构造器和说明 |
---|
EntityChangeBlockEvent(Entity what,
Block block,
Material to,
byte data)
已过时。
不安全的参数
|
限定符和类型 | 方法和说明 |
---|---|
Material |
FurnaceExtractEvent.getItemType()
获取被取出的物品的类型.
|
构造器和说明 |
---|
FurnaceExtractEvent(Player player,
Block block,
Material itemType,
int itemAmount,
int exp) |
限定符和类型 | 方法和说明 |
---|---|
Material |
PlayerBucketEvent.getBucket()
返回玩家手里的桶的类型.
|
Material |
PlayerInteractEvent.getMaterial()
方便的方法, 返回由此事件表示的物品的材质
原文:Convenience method.
|
Material |
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) |
限定符和类型 | 方法和说明 |
---|---|
Material |
ChunkGenerator.ChunkData.getType(int x,
int y,
int z)
Get the type of the block at x, y, z.
|
限定符和类型 | 方法和说明 |
---|---|
void |
ChunkGenerator.ChunkData.setBlock(int x,
int y,
int z,
Material material)
Set the block at x,y,z in the chunk data to material.
|
void |
ChunkGenerator.ChunkData.setRegion(int xMin,
int yMin,
int zMin,
int xMax,
int yMax,
int zMax,
Material material)
Set a region of this chunk from xMin, yMin, zMin (inclusive)
to xMax, yMax, zMax (exclusive) to material.
|
限定符和类型 | 方法和说明 |
---|---|
Material |
ItemStack.getType()
获取该物品的种类.
|
限定符和类型 | 方法和说明 |
---|---|
ShapelessRecipe |
ShapelessRecipe.addIngredient(int count,
Material ingredient)
Adds multiples of the specified ingredient.
|
ShapelessRecipe |
ShapelessRecipe.addIngredient(int count,
Material ingredient,
int rawdata)
已过时。
Magic value
|
ShapelessRecipe |
ShapelessRecipe.addIngredient(Material ingredient)
Adds the specified ingredient.
|
ShapelessRecipe |
ShapelessRecipe.addIngredient(Material ingredient,
int rawdata)
已过时。
Magic value
|
java.util.HashMap<java.lang.Integer,? extends ItemStack> |
Inventory.all(Material material)
查找在物品栏内的包含指定物品的所有格子与物品堆.
|
ItemMeta |
ItemFactory.asMetaFor(ItemMeta meta,
Material material)
返回一个适用于给定的Material的ItemMeta
返回的元数据将始终是指定材质的给定
Material 的有效元数据. |
boolean |
Inventory.contains(Material material)
检测这个物品栏是否含有指定的物品.
|
boolean |
Inventory.contains(Material material,
int amount)
检查物品栏内是否包含指定的物品,并检查物品堆的数量是否足够(译者自述).
|
int |
Inventory.first(Material material)
查找包含此物品的第一个格子.
|
ItemMeta |
ItemFactory.getItemMeta(Material material)
该方法能够为给定的
Material 创建一个新的元数据。 |
boolean |
ItemFactory.isApplicable(ItemMeta meta,
Material material)
该方法用于检查元数据是否能够适用于指定的
Material 上(如果适用则不会丢失数据). |
void |
Inventory.remove(Material material)
移除在物品栏内与给定物品匹配的所有物品堆.
|
ShapelessRecipe |
ShapelessRecipe.removeIngredient(int count,
Material ingredient)
Removes multiple instances of an ingredient from the list.
|
ShapelessRecipe |
ShapelessRecipe.removeIngredient(int count,
Material ingredient,
int rawdata)
已过时。
Magic value
|
ShapelessRecipe |
ShapelessRecipe.removeIngredient(Material ingredient)
Removes an ingredient from the list.
|
ShapelessRecipe |
ShapelessRecipe.removeIngredient(Material ingredient,
int rawdata)
已过时。
Magic value
|
ShapedRecipe |
ShapedRecipe.setIngredient(char key,
Material ingredient)
Sets the material that a character in the recipe shape refers to.
|
ShapedRecipe |
ShapedRecipe.setIngredient(char key,
Material ingredient,
int raw)
已过时。
Magic value
|
FurnaceRecipe |
FurnaceRecipe.setInput(Material input)
设置此冶炼配方的原料.
|
FurnaceRecipe |
FurnaceRecipe.setInput(Material input,
int data)
已过时。
Magic value
|
void |
ItemStack.setType(Material type)
设置该物品的种类.
|
构造器和说明 |
---|
FurnaceRecipe(ItemStack result,
Material source)
创建一个熔炉冶炼配方.
|
FurnaceRecipe(ItemStack result,
Material source,
int data)
已过时。
不安全的参数
|
FurnaceRecipe(ItemStack result,
Material source,
int data,
float experience)
已过时。
不安全的参数
|
ItemStack(Material type)
构造一个堆叠数为1, 无附加数据的物品堆.
|
ItemStack(Material type,
int amount)
构造指定堆叠数, 无附加数据的物品堆.
|
ItemStack(Material type,
int amount,
short damage)
构造一个具有指定损耗值(耐久度)的物品堆.
|
ItemStack(Material type,
int amount,
short damage,
java.lang.Byte data)
已过时。
该方法使用了意义不明确的data byte对象
|
限定符和类型 | 字段和说明 |
---|---|
protected static Material |
Leaves.DEFAULT_TYPE |
protected static Material |
Crops.DEFAULT_TYPE |
protected static Material |
Wood.DEFAULT_TYPE |
protected static Material |
WoodenStep.DEFAULT_TYPE |
protected static Material |
Tree.DEFAULT_TYPE |
限定符和类型 | 方法和说明 |
---|---|
Material |
MaterialData.getItemType()
获取这个MaterialData代表的Material.
|
Material |
TexturedMaterial.getMaterial()
获取这个方块是由什么物品制成的。
|
static Material |
Door.getWoodDoorOfSpecies(TreeSpecies species)
Returns the item type of a wooden door for the given tree species.
|
限定符和类型 | 方法和说明 |
---|---|
abstract java.util.List<Material> |
TexturedMaterial.getTextures()
检索可能的材质列表.列表的第一个元素将用来作为缺省值.
|
java.util.List<Material> |
Step.getTextures() |
java.util.List<Material> |
MonsterEggs.getTextures() |
java.util.List<Material> |
SmoothBrick.getTextures() |
限定符和类型 | 方法和说明 |
---|---|
void |
TexturedMaterial.setMaterial(Material material)
设置这个方块是由什么物品制成的.
|
构造器和说明 |
---|
Banner(Material type) |
Banner(Material type,
byte data)
已过时。
不安全的参数
|
Bed(Material type) |
Bed(Material type,
byte data)
已过时。
不安全的参数
|
Button(Material type) |
Button(Material type,
byte data)
已过时。
不安全的参数
|
Cake(Material type) |
Cake(Material type,
byte data)
已过时。
不安全的参数
|
Chest(Material type) |
Chest(Material type,
byte data)
已过时。
不安全的参数
|
Coal(Material type) |
Coal(Material type,
byte data)
已过时。
不安全的参数
|
Command(Material type) |
Command(Material type,
byte data)
已过时。
不安全的参数
|
Comparator(Material type) |
Comparator(Material type,
byte data)
已过时。
不安全的参数
|
Crops(Material type)
构造一个处于播种阶段的给定类型的农作物.
|
Crops(Material type,
byte data)
已过时。
不安全的参数
|
Crops(Material type,
CropState state)
构造一个处于给定生长阶段的给定类型的农作物方块.
|
DetectorRail(Material type) |
DetectorRail(Material type,
byte data)
已过时。
不安全的参数
|
Diode(Material type) |
Diode(Material type,
byte data)
已过时。
不安全的参数
|
DirectionalContainer(Material type) |
DirectionalContainer(Material type,
byte data)
已过时。
不安全的参数
|
Dispenser(Material type) |
Dispenser(Material type,
byte data)
已过时。
不安全的参数
|
Door(Material type) |
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
|
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(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)
已过时。
不安全的参数
|
Dye(Material type) |
Dye(Material type,
byte data)
已过时。
不安全的参数
|
EnderChest(Material type) |
EnderChest(Material type,
byte data)
已过时。
不安全的参数
|
ExtendedRails(Material type) |
ExtendedRails(Material type,
byte data)
已过时。
不安全的参数
|
FlowerPot(Material type)
已过时。
|
FlowerPot(Material type,
byte data)
已过时。
不安全的参数
|
Furnace(Material type) |
Furnace(Material type,
byte data)
已过时。
不安全的参数
|
FurnaceAndDispenser(Material type) |
FurnaceAndDispenser(Material type,
byte data)
已过时。
不安全的参数
|
Hopper(Material type) |
Hopper(Material type,
byte data)
已过时。
不安全的参数
|
Ladder(Material type) |
Ladder(Material type,
byte data)
已过时。
不安全的参数
|
Leaves(Material type)
Constructs a leaf block of the given type.
|
Leaves(Material type,
byte data)
已过时。
不安全的参数
|
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.
|
Lever(Material type) |
Lever(Material type,
byte data)
已过时。
不安全的参数
|
LongGrass(Material type) |
LongGrass(Material type,
byte data)
已过时。
不安全的参数
|
MaterialData(Material type) |
MaterialData(Material type,
byte data)
已过时。
不安全的参数
|
MonsterEggs(Material type) |
MonsterEggs(Material type,
byte data)
已过时。
不安全的参数
|
Mushroom(Material shroom)
Constructs a brown/red mushroom block with all sides set to pores.
|
Mushroom(Material shroom,
BlockFace capFace)
Constructs a brown/red mushroom cap block with the specified face or
faces set to cap texture.
|
Mushroom(Material shroom,
byte data)
已过时。
Magic value
|
Mushroom(Material shroom,
MushroomBlockTexture texture)
Constructs a brown/red mushroom block with the specified textures.
|
NetherWarts(Material type) |
NetherWarts(Material type,
byte data)
已过时。
不安全的参数
|
Observer(Material type) |
Observer(Material type,
byte data)
已过时。
Magic value
|
PistonBaseMaterial(Material type) |
PistonBaseMaterial(Material type,
byte data)
已过时。
不安全的参数
|
PistonExtensionMaterial(Material type) |
PistonExtensionMaterial(Material type,
byte data)
已过时。
不安全的参数
|
PoweredRail(Material type) |
PoweredRail(Material type,
byte data)
已过时。
不安全的参数
|
PressurePlate(Material type) |
PressurePlate(Material type,
byte data)
已过时。
不安全的参数
|
Pumpkin(Material type) |
Pumpkin(Material type,
byte data)
已过时。
不安全的参数
|
Rails(Material type) |
Rails(Material type,
byte data)
已过时。
不安全的参数
|
RedstoneTorch(Material type) |
RedstoneTorch(Material type,
byte data)
已过时。
不安全的参数
|
RedstoneWire(Material type) |
RedstoneWire(Material type,
byte data)
已过时。
不安全的参数
|
Sandstone(Material type) |
Sandstone(Material type,
byte data)
已过时。
不安全的参数
|
Sapling(Material type)
以给定的物品种类构造本类.
|
Sapling(Material type,
byte data)
已过时。
不安全的参数
|
Sapling(Material type,
TreeSpecies species)
以给定的物品种类和树木种类构造本类.
|
Sapling(Material type,
TreeSpecies species,
boolean isInstantGrowable)
以给定的物品种类和树木种类和是否瞬间长大构造本类.
|
Sign(Material type) |
Sign(Material type,
byte data)
已过时。
不安全的参数
|
SimpleAttachableMaterialData(Material type) |
SimpleAttachableMaterialData(Material type,
BlockFace direction) |
SimpleAttachableMaterialData(Material type,
byte data)
已过时。
不安全的参数
|
Skull(Material type) |
Skull(Material type,
byte data)
已过时。
不安全的参数
|
SmoothBrick(Material type) |
SmoothBrick(Material type,
byte data)
已过时。
不安全的参数
|
Stairs(Material type) |
Stairs(Material type,
byte data)
已过时。
不安全的参数
|
Step(Material type) |
Step(Material type,
byte data)
已过时。
不安全的参数
|
TexturedMaterial(Material m) |
TexturedMaterial(Material type,
byte data)
已过时。
不安全的参数
|
Torch(Material type) |
Torch(Material type,
byte data)
已过时。
不安全的参数
|
TrapDoor(Material type) |
TrapDoor(Material type,
byte data)
已过时。
不安全的参数
|
Tree(Material type)
Constructs a tree block of the given type.
|
Tree(Material type,
byte data)
已过时。
不安全的参数
|
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)
以给定的物品种类构造本类.
|
Wood(Material type,
byte data)
已过时。
不安全的参数
|
Wood(Material type,
TreeSpecies species)
以给定的物品种类和树木种类构造本类.
|
WoodenStep(Material type,
byte data)
已过时。
不安全的参数
|
Wool(Material type) |
Wool(Material type,
byte data)
已过时。
不安全的参数
|