接口的使用
org.bukkit.block.Block
程序包
说明
Bukkit的常用类.
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.与处理玩家输入的非聊天消息(即命令)相关的类.
为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.代表一个抛射物的抛射源的类的集合.
提供多种目的和单一目的的类以简化各种编程概念.
-
org.bukkit中Block的使用
修饰符和类型方法说明Chunk.getBlock
(int x, int y, int z) 从区块中获取某个方块(Block
).Location.getBlock()
获取本位置对应的方块.World.getBlockAt
(int x, int y, int z) 获取坐标所指的方块
.World.getBlockAt
(Location location) World.getHighestBlockAt
(int x, int z) 获取指定坐标的最顶上的方块(不是空气).World.getHighestBlockAt
(Location location) 获取指定位置
的最顶上的方块(不是空气). -
org.bukkit.block中Block的使用
修饰符和类型方法说明BlockState.getBlock()
Gets the block represented by this block state.Block.getRelative
(int modX, int modY, int modZ) 以指定坐标偏移量获取方块 (相对与方块位置的偏移量).Block.getRelative
(BlockFace face) Gets the block at the given faceBlock.getRelative
(BlockFace face, int distance) Gets the block at the given distance of the given face -
org.bukkit.command中Block的使用
-
org.bukkit.entity中Block的使用
修饰符和类型方法说明Arrow.getAttachedBlock()
获取该箭矢附着在哪个方块上.LivingEntity.getTargetBlock
(Set<Material> transparent, int maxDistance) 获取生物实体的目标方块。修饰符和类型方法说明LivingEntity.getLastTwoTargetBlocks
(Set<Material> transparent, int maxDistance) 获取沿生物实体视线上最后两个方块。LivingEntity.getLineOfSight
(Set<Material> transparent, int maxDistance) 获取沿生物实体视线上的所有方块。 -
org.bukkit.event.block中Block的使用
修饰符和类型字段说明protected Block
BlockEvent.block
protected Block
BlockPlaceEvent.placedAgainst
protected Block
BlockFromToEvent.to
修饰符和类型方法说明final Block
BlockEvent.getBlock()
获取这个事件是哪个方块发生的.BlockPlaceEvent.getBlockAgainst()
获取这个方块是依附在哪个方块上放置的.BlockPlaceEvent.getBlockPlaced()
获得被放置的方块(还未真正被放置).BlockBurnEvent.getIgnitingBlock()
获取点燃这个方块的方块.BlockIgniteEvent.getIgnitingBlock()
获取点燃方块的方块.BlockSpreadEvent.getSource()
获取这个事件中蔓延的源方块.BlockFromToEvent.getToBlock()
获取方块要移动到的地方的一个快捷的方法.修饰符和类型方法说明BlockExplodeEvent.blockList()
返回被炸毁的方块的列表.BlockPistonExtendEvent.getBlocks()
获取被活塞移动的不可改变的方块列表.BlockPistonRetractEvent.getBlocks()
获取被活塞移动的不可改变的方块列表.限定符构造器说明BlockBreakEvent
(Block theBlock, Player player) BlockBurnEvent
(Block block) 已过时。BlockBurnEvent
(Block block, Block ignitingBlock) BlockCanBuildEvent
(Block block, int id, boolean canBuild) 已过时。不安全的参数BlockDamageEvent
(Player player, Block block, ItemStack itemInHand, boolean instaBreak) BlockDispenseEvent
(Block block, ItemStack dispensed, Vector velocity) BlockEvent
(Block theBlock) BlockExpEvent
(Block block, int exp) BlockExplodeEvent
(Block what, List<Block> blocks, float yield) BlockFadeEvent
(Block block, BlockState newState) BlockFormEvent
(Block block, BlockState newState) BlockFromToEvent
(Block block, Block toBlock) BlockFromToEvent
(Block block, BlockFace face) BlockGrowEvent
(Block block, BlockState newState) BlockIgniteEvent
(Block theBlock, BlockIgniteEvent.IgniteCause cause, Block ignitingBlock) BlockIgniteEvent
(Block theBlock, BlockIgniteEvent.IgniteCause cause, Entity ignitingEntity) BlockIgniteEvent
(Block theBlock, BlockIgniteEvent.IgniteCause cause, Entity ignitingEntity, Block ignitingBlock) BlockMultiPlaceEvent
(List<BlockState> states, Block clicked, ItemStack itemInHand, Player thePlayer, boolean canBuild) BlockPhysicsEvent
(Block block, int changed) 已过时。不安全的参数BlockPistonEvent
(Block block, BlockFace direction) BlockPistonExtendEvent
(Block block, int length, BlockFace direction) 已过时。BlockPistonExtendEvent
(Block block, List<Block> blocks, BlockFace direction) BlockPistonRetractEvent
(Block block, List<Block> blocks, BlockFace direction) BlockPlaceEvent
(Block placedBlock, BlockState replacedBlockState, Block placedAgainst, ItemStack itemInHand, Player thePlayer, boolean canBuild) 已过时。BlockPlaceEvent
(Block placedBlock, BlockState replacedBlockState, Block placedAgainst, ItemStack itemInHand, Player thePlayer, boolean canBuild, EquipmentSlot hand) BlockRedstoneEvent
(Block block, int oldCurrent, int newCurrent) BlockSpreadEvent
(Block block, Block source, BlockState newState) CauldronLevelChangeEvent
(Block block, Entity entity, CauldronLevelChangeEvent.ChangeReason reason, int oldLevel, int newLevel) EntityBlockFormEvent
(Entity entity, Block block, BlockState blockstate) LeavesDecayEvent
(Block block) NotePlayEvent
(Block block, Instrument instrument, Note note) SignChangeEvent
(Block theBlock, Player thePlayer, String[] theLines) 限定符构造器说明BlockExplodeEvent
(Block what, List<Block> blocks, float yield) BlockPistonExtendEvent
(Block block, List<Block> blocks, BlockFace direction) BlockPistonRetractEvent
(Block block, List<Block> blocks, BlockFace direction) -
org.bukkit.event.enchantment中Block的使用
修饰符和类型方法说明EnchantItemEvent.getEnchantBlock()
获取附魔这个物品的方块。PrepareItemEnchantEvent.getEnchantBlock()
获取附魔台方块.限定符构造器说明EnchantItemEvent
(Player enchanter, InventoryView view, Block table, ItemStack item, int level, Map<Enchantment, Integer> enchants, int i) PrepareItemEnchantEvent
(Player enchanter, InventoryView view, Block table, ItemStack item, EnchantmentOffer[] offers, int bonus) -
org.bukkit.event.entity中Block的使用
修饰符和类型方法说明EntityChangeBlockEvent.getBlock()
返回改变之前的方块(Block)类 原文: Gets the block the entity is changingEntityInteractEvent.getBlock()
返回实体交互的方块EntityCombustByBlockEvent.getCombuster()
造成燃烧的可以是岩浆或者一个着火的方块.EntityDamageByBlockEvent.getDamager()
返回试玩家受到伤害的Block类ProjectileHitEvent.getHitBlock()
Gets the block that was hit, if it was a block that was hit.限定符构造器说明EntityBreakDoorEvent
(LivingEntity entity, Block targetBlock) EntityChangeBlockEvent
(Entity what, Block block, Material to, byte data) 已过时。不安全的参数EntityCombustByBlockEvent
(Block combuster, Entity combustee, int duration) EntityDamageByBlockEvent
(Block damager, Entity damagee, EntityDamageEvent.DamageCause cause, double damage) 已过时。EntityDamageByBlockEvent
(Block damager, Entity damagee, EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Double> modifiers, Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) EntityInteractEvent
(Entity entity, Block block) ProjectileHitEvent
(Projectile projectile, Block hitBlock) ProjectileHitEvent
(Projectile projectile, Entity hitEntity, Block hitBlock) -
org.bukkit.event.hanging中Block的使用
-
org.bukkit.event.inventory中Block的使用
限定符构造器说明BrewEvent
(Block brewer, BrewerInventory contents, int fuelLevel) BrewingStandFuelEvent
(Block brewingStand, ItemStack fuel, int fuelPower) FurnaceBurnEvent
(Block furnace, ItemStack fuel, int burnTime) FurnaceExtractEvent
(Player player, Block block, Material itemType, int itemAmount, int exp) FurnaceSmeltEvent
(Block furnace, ItemStack source, ItemStack result) -
org.bukkit.event.player中Block的使用
修饰符和类型方法说明PlayerBedEnterEvent.getBed()
返回此事件涉及的床.PlayerBedLeaveEvent.getBed()
返回此事件涉及的床.PlayerBucketEvent.getBlockClicked()
玩家正在对着哪个方块使用桶,返回那个方块.PlayerInteractEvent.getClickedBlock()
返回被点击的方块限定符构造器说明PlayerBedEnterEvent
(Player who, Block bed) PlayerBedLeaveEvent
(Player who, Block bed) 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) PlayerInteractEvent
(Player who, Action action, ItemStack item, Block clickedBlock, BlockFace clickedFace) PlayerInteractEvent
(Player who, Action action, ItemStack item, Block clickedBlock, BlockFace clickedFace, EquipmentSlot hand) -
org.bukkit.event.vehicle中Block的使用
-
org.bukkit.event.world中Block的使用
限定符构造器说明PortalCreateEvent
(Collection<Block> blocks, World world, PortalCreateEvent.CreateReason reason) -
org.bukkit.projectiles中Block的使用
-
org.bukkit.util中Block的使用