类的使用
org.bukkit.Location
使用Location的程序包
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界内的三位像素(方块),包括一些特定的状态.各种方块的 BlockData 类.
与创建Boss血量条(出现在玩家客户端屏幕顶部)有关的类.
与处理玩家输入的非聊天消息(即命令)相关的类.
专门用于处理插件运行时配置的类.
Classes concerning damage types and sources applicable to living entities.
为在
世界内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.与实体的持久化内存有关的类, 目前仅与村民有关.
简化
世界生成实现的类.参与操作玩家物品栏和物品交互的类.
用于操作可以存储在
物品堆的额外数据的接口.A Package that contains builders for building InventoryViews.
与战利品表产生与操作有关的类 (Minecraft Wiki - 战利品表).
Classes related to creating or using
structures without creating Structure
blocks in the world.提供多种目的和单一目的的类以简化各种编程概念.
Spigot特有的玩家事件.
-
org.bukkit中Location的使用
返回Location的org.bukkit中的方法修饰符和类型方法说明Location.add(double x, double y, double z) 将本位置的坐标加上另一个位置的坐标.将本位置的坐标加上另一个位置的坐标.将本位置的坐标加上一个向量的坐标.Location.clone()Location.deserialize(@NotNull Map<String, Object> args) 实现配置序列化与反序列化所需方法.OfflinePlayer.getBedSpawnLocation()已过时。误导性的方法名称.WorldBorder.getCenter()得到当前边界的中心.OfflinePlayer.getLastDeathLocation()获取玩家最后一次死亡的位置.OfflinePlayer.getLocation()获取玩家当前位置.Raid.getLocation()获取袭击的中心位置.Vibration.Destination.BlockDestination.getLocation()Vibration.getOrigin()获取振动的起源位置。OfflinePlayer.getRespawnLocation()获取玩家的重生点位置, 如果没有有效的重生点则返回 null.World.getSpawnLocation()获取这个世界的默认出生点位置.Particle.Trail.getTarget()要显示的粒子的目标。World.locateNearestStructure(@NotNull Location origin, StructureType structureType, int radius, boolean findUnexplored) Location.multiply(double m) 坐标数乘, 将所有坐标轴上扩展某个倍数.Location.setDirection(@NotNull Vector vector) Location.subtract(double x, double y, double z) 从本位置的坐标中减去另一个位置的坐标.将本位置的坐标减去另一个位置的坐标.从本位置的坐标中减去向量的坐标.Location.zero()清零此位置的xyz坐标数值.参数类型为Location的org.bukkit中的方法修饰符和类型方法说明将本位置的坐标加上另一个位置的坐标.<T extends Entity>
TRegionAccessor.createEntity(@NotNull Location location, @NotNull Class<T> clazz) 在指定位置创建一个特定类的实体,但不会将其生成到世界中.Bukkit.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) 创建一个以最近的指定结构类型为目标的新探险家地图.Bukkit.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored) 创建一个以最近的指定结构类型为目标的新探险家地图.Server.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) 创建一个新的探索者地图, 以定位最近的指定StructureType结构.Server.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored) 创建一个新的探索者地图, 以定位最近的指定StructureType结构.booleanWorld.createExplosion(@NotNull Location loc, float power) 在指定坐标生成指定威力的爆炸.booleanWorld.createExplosion(@NotNull Location loc, float power, boolean setFire) 在指定的坐标生成指定威力的爆炸并设置方块是否会着火.booleanWorld.createExplosion(@NotNull Location loc, float power, boolean setFire, boolean breakBlocks) 在指定位置生成指定威力的爆炸并设置方块是否会着火或被破坏.booleanWorld.createExplosion(@NotNull Location loc, float power, boolean setFire, boolean breakBlocks, @Nullable Entity source) 在指定位置生成指定威力的爆炸并设置方块是否会着火或被破坏.double获取本位置与与另一个位置之间的距离.doubleLocation.distanceSquared(@NotNull Location o) 获取本位置与与另一个位置之间的距离的平方.在指定的位置丢出一个物品.World.dropItem(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) 在指定的位置丢出一个物品.World.dropItemNaturally(@NotNull Location location, @NotNull ItemStack item) 在指定的位置丢出一个随机偏移的物品.World.dropItemNaturally(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) 在指定的位置丢出一个随机偏移的物品.booleanRegionAccessor.generateTree(@NotNull Location location, @NotNull Random random, @NotNull TreeType type) 在指定位置创建一棵树.booleanRegionAccessor.generateTree(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Consumer<? super BlockState> stateConsumer) 在指定位置创建一棵树.booleanRegionAccessor.generateTree(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Predicate<? super BlockState> statePredicate) 在指定位置创建一棵树.booleanWorld.generateTree(@NotNull Location location, @NotNull TreeType type) 在指定的位置创建一颗树.booleanWorld.generateTree(@NotNull Location loc, @NotNull TreeType type, @NotNull BlockChangeDelegate delegate) 已过时。此方法不处理方块实体(蜂巢)World.getBlockAt(@NotNull Location location) RegionAccessor.getBlockData(@NotNull Location location) RegionAccessor.getBlockState(@NotNull Location location) World.getChunkAt(@NotNull Location location) World.getHighestBlockAt(@NotNull Location location) 获取指定位置最高处不是空气且不可逾越的方块.World.getHighestBlockAt(@NotNull Location location, @NotNull HeightMap heightMap) intRegionAccessor.getHighestBlockYAt(@NotNull Location location) 获取指定位置处最高非空(不可通过)方块的坐标.intRegionAccessor.getHighestBlockYAt(@NotNull Location location, @NotNull HeightMap heightMap) World.getNearbyEntities(@NotNull Location location, double x, double y, double z) 返回一个以这个位置为中心的包围着的所有实体的列表(译注:这个可能不太好理解,就是在这个位置,按指定的搜索范围,搜索这个范围里的所有实体).World.getNearbyEntities(@NotNull Location location, double x, double y, double z, @Nullable Predicate<? super Entity> filter) 返回一个以这个位置为中心的包围着的所有实体的列表.boolean检查指定的位置是否在这个边界里面.World.locateNearestBiome(@NotNull Location origin, int radius, int horizontalInterval, int verticalInterval, @NotNull Biome... biomes) 查找最近的与提供的生物群系匹配的位置.World.locateNearestBiome(@NotNull Location origin, int radius, @NotNull Biome... biomes) 查找最近的与提供的生物群系匹配的位置.World.locateNearestRaid(@NotNull Location location, int radius) 寻找与给定位置相距最近的袭击.World.locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored) 查找最近的指定结构的结构.World.locateNearestStructure(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored) 查找最近的指定结构类型的结构.World.locateNearestStructure(@NotNull Location origin, StructureType structureType, int radius, boolean findUnexplored) voidWorld.playEffect(@NotNull Location location, @NotNull Effect effect, int data) 向以指定位置为圆心的默认半径内的所有玩家施加(给予)一个效果.voidWorld.playEffect(@NotNull Location location, @NotNull Effect effect, int data, int radius) 向在以指定位置为圆心的指定半径内的所有玩家施加(给予)一个效果。<T> voidWorld.playEffect(@NotNull Location location, @NotNull Effect effect, T data) 向在以指定位置为圆心的默认半径内的所有玩家施加(给予)一个效果。<T> voidWorld.playEffect(@NotNull Location location, @NotNull Effect effect, T data, int radius) 向在以指定位置为圆心的指定半径内的所有玩家施加(给予)一个效果。void在世界中指定的位置播放一个音符.void在世界中指定的位置播放一个声音.voidWorld.playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) 在世界中指定的位置播放一个声音.voidWorld.playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) 在世界中指定的位置播放一个声音.void在世界中指定的位置播放一个声音。voidWorld.playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) 在世界中指定的位置播放一个声音.voidWorld.playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) 在世界中指定的位置播放一个声音.World.rayTrace(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter) 执行射线跟踪, 检查方块碰撞和实体碰撞.World.rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance) 执行射线跟踪, 使用方块的精确碰撞形状来检查方块碰撞.World.rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode) 执行射线跟踪, 使用方块的精确碰撞形状来检查方块碰撞.World.rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks) 执行射线跟踪, 使用方块的精确碰撞形状来检查方块碰撞.World.rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance) 执行检查实体碰撞的射线跟踪.World.rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize) 执行检查实体碰撞的射线跟踪.World.rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<? super Entity> filter) 执行检查实体碰撞的射线跟踪.World.rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<? super Entity> filter) 执行检查实体碰撞的射线跟踪.voidvoidRegionAccessor.setBlockData(@NotNull Location location, @NotNull BlockData blockData) void设置新的边界中心booleanWorld.setSpawnLocation(@NotNull Location location) 设置这个世界的出生点位置.void<T extends Entity>
T在指定的位置根据给定的类生成一个实体.<T extends Entity>
TRegionAccessor.spawn(@NotNull Location location, @NotNull Class<T> clazz, boolean randomizeData, @Nullable Consumer<? super T> function) 在指定位置创建一个新实体.<T extends Entity>
TRegionAccessor.spawn(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<? super T> function) 在指定位置根据给定的类生成一个实体,并在实体被添加到世界之前运行提供的函数.<T extends LivingEntity>
TWorld.spawn(@NotNull Location location, @NotNull Class<T> clazz, CreatureSpawnEvent.SpawnReason spawnReason, boolean randomizeData, @Nullable Consumer<? super T> function) 在给定的位置创建一个新实体, 并在实体被添加到世界之前运行提供的函数.World.spawnArrow(@NotNull Location location, @NotNull Vector direction, float speed, float spread) <T extends AbstractArrow>
TWorld.spawnArrow(@NotNull Location location, @NotNull Vector direction, float speed, float spread, @NotNull Class<T> clazz) 在给定的位置生成指定类型的箭矢实体.RegionAccessor.spawnEntity(@NotNull Location location, @NotNull EntityType type) 在指定的位置创建一个实体.RegionAccessor.spawnEntity(@NotNull Location loc, @NotNull EntityType type, boolean randomizeData) 在指定位置创建一个新实体.World.spawnFallingBlock(@NotNull Location location, @NotNull BlockData data) World.spawnFallingBlock(@NotNull Location location, @NotNull MaterialData data) World.spawnFallingBlock(@NotNull Location location, @NotNull Material material, byte data) 已过时。不安全的参数voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count) 在目标位置生成粒子(由count指定数量).voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ) 在目标位置生成粒子(由count指定数量).voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) 在目标位置生成粒子(由count指定数量).<T> voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) 在目标位置生成粒子(由count指定数量).<T> voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) 在目标位置生成粒子(由count指定数量).<T> voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, T data) 在目标位置生成粒子(由count指定数量).<T> voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, T data) 在目标位置生成粒子(由count指定数量).World.Spigot.strikeLightning(@NotNull Location loc, boolean isSilent) 已过时。声音现在是客户端侧的, 无法移除World.strikeLightning(@NotNull Location loc) 在指定的位置劈下闪电.World.Spigot.strikeLightningEffect(@NotNull Location loc, boolean isSilent) 已过时。声音现在是客户端侧的, 无法移除World.strikeLightningEffect(@NotNull Location loc) 在指定的位置劈下不会造成伤害的闪电.将本位置的坐标减去另一个位置的坐标.参数类型为Location的org.bukkit中的构造器 -
org.bukkit.block中Location的使用
返回Location的org.bukkit.block中的方法修饰符和类型方法说明EndGateway.getExitLocation()获取当实体进入折跃门时被传送到的位置.Beehive.getFlower()获取花的位置.Block.getLocation()获取这个方块的位置.Block.getLocation(@Nullable Location loc) 存储此方块的位置到到给定的位置实例中.BlockState.getLocation()获取此方块状态的位置.BlockState.getLocation(@Nullable Location loc) 存储此方块状态的位置到给定的位置实例中.DoubleChest.getLocation()参数类型为Location的org.bukkit.block中的方法修饰符和类型方法说明将此状态复制到另一个位置作为未放置的BlockState.Block.getLocation(@Nullable Location loc) 存储此方块的位置到到给定的位置实例中.BlockState.getLocation(@Nullable Location loc) 存储此方块状态的位置到给定的位置实例中.Block.rayTrace(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode) 对此特定方块执行射线追踪, 使用其精确的碰撞形状检查碰撞情况.voidEndGateway.setExitLocation(@Nullable Location location) 设置进入折跃门时传送的位置.void设置花的位置. -
org.bukkit.block.data中Location的使用
参数类型为Location的org.bukkit.block.data中的方法修饰符和类型方法说明booleanBlockData.isSupported(@NotNull Location location) 检查如果此状态下的方块放置在给定的Location的方块上,它是否会被正常支撑。 -
org.bukkit.boss中Location的使用
返回Location的org.bukkit.boss中的方法 -
org.bukkit.command中Location的使用
参数类型为Location的org.bukkit.command中的方法修饰符和类型方法说明Command.tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args, @Nullable Location location) 对此命令进行tab补全并返回补全项列表.CommandMap.tabComplete(@NotNull CommandSender sender, @NotNull String cmdLine, @Nullable Location location) 查找请求的命令并执行适当的tab补全器,如果找到了.SimpleCommandMap.tabComplete(@NotNull CommandSender sender, @NotNull String cmdLine, @Nullable Location location) -
org.bukkit.configuration中Location的使用
修饰符和类型方法说明ConfigurationSection.getLocation(@NotNull String path) 在指定路径获取一个 Location 类型的值.ConfigurationSection.getLocation(@NotNull String path, @Nullable Location def) 在指定路径获取一个Location, 如果未找到则返回默认值.MemorySection.getLocation(@NotNull String path) MemorySection.getLocation(@NotNull String path, @Nullable Location def) 参数类型为Location的org.bukkit.configuration中的方法 -
org.bukkit.damage中Location的使用
返回Location的org.bukkit.damage中的方法修饰符和类型方法说明DamageSource.getDamageLocation()获取伤害来源的Location.DamageSource.getSourceLocation()获取伤害来源的Location.参数类型为Location的org.bukkit.damage中的方法 -
org.bukkit.entity中Location的使用
返回Location的org.bukkit.entity中的方法修饰符和类型方法说明Sniffer.findPossibleDigLocation()尝试获取嗅探兽可能挖掘的位置。EnderCrystal.getBeamTarget()Gets the location that this end crystal is pointing its beam to.HumanEntity.getBedLocation()获取玩家当前正在睡觉的床的位置。Player.getBedSpawnLocation()已过时。名称有误导性.Vex.getBound()Gets the bound of this entity.Player.getCompassTarget()得到玩家指南针的指向的位置(Location).LivingEntity.getEyeLocation()获取生物实体眼睛的详细方位的Location对象.Bee.getFlower()获取蜜蜂盘旋的花的位置.Bee.getHive()获取蜜蜂的家(蜂巢)的位置.Creaking.getHome()获取此咔嗒嘎的家位置 (即其对应的CreakingHeart所在位置).Allay.getJukebox()获取悦灵正在跳舞的唱片机.HumanEntity.getLastDeathLocation()获取玩家上次死亡的位置。Entity.getLocation()获取实体当前位置Entity.getLocation(@Nullable Location loc) 将实体的当前位置存储到提供的Location中.Player.getRespawnLocation()获取玩家的重生位置, 如果没有有效的重生点则返回null.EnderSignal.getTargetLocation()获取末影之眼移向的位置.返回变量类型为Location的类型的org.bukkit.entity中的方法参数类型为Location的org.bukkit.entity中的方法修饰符和类型方法说明voidSniffer.addExploredLocation(@NotNull Location location) 向已探索位置中添加一个位置。创建此实体及其所有数据的副本.EntitySnapshot.createEntity(@NotNull Location to) 使用此模板创建实体并在指定位置生成.Entity.getLocation(@Nullable Location loc) 将实体的当前位置存储到提供的Location中.HumanEntity.openEnchanting(@Nullable Location location, boolean force) 已过时。T此方法应由MenuType.ENCHANTMENT代替, 参见MenuType.Typed.builder()及其选项.HumanEntity.openWorkbench(@Nullable Location location, boolean force) 已过时。此方法应由MenuType.CRAFTING代替, 参见MenuType.Typed.builder()及其选项.voidPlayer.playEffect(@NotNull Location loc, @NotNull Effect effect, int data) 已过时。不安全的参数<T> voidPlayer.playEffect(@NotNull Location loc, @NotNull Effect effect, T data) void已过时。不安全的参数void在指定位置处为玩家播放一个音符.void向玩家在某个位置播放一个声音.voidPlayer.playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) 向玩家在指定位置播放声音.voidPlayer.playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) 在指定位置为玩家播放声音.void向玩家在某个位置播放一个声音.voidPlayer.playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) 向玩家在指定位置播放声音.voidPlayer.playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) 在指定位置为玩家播放声音.voidSniffer.removeExploredLocation(@NotNull Location location) 从已探索位置中移除一个位置。voidPlayer.sendBlockChange(@NotNull Location loc, @NotNull BlockData block) 向该玩家发送一个伪造的指定位置的方块(Block)更改数据包.这不会改变世界中的方块.voidPlayer.sendBlockChange(@NotNull Location loc, @NotNull Material material, byte data) 已过时。不安全的参数voidPlayer.sendBlockDamage(@NotNull Location loc, float progress) 发送方块损坏效果.voidPlayer.sendBlockDamage(@NotNull Location loc, float progress, int sourceId) 发送方块损坏效果.voidPlayer.sendBlockDamage(@NotNull Location loc, float progress, @NotNull Entity source) 发送方块损坏效果.voidPlayer.sendBlockUpdate(@NotNull Location loc, @NotNull TileState tileState) 发送一个 TileState 变更数据包.voidPlayer.sendSignChange(@NotNull Location loc, @Nullable String[] lines) 向该玩家发送一个伪造的牌子(Sign)上的字的更改数据包.这不会改变世界中的任何方块.void向该玩家发送一个伪造的牌子(Sign)上的字的更改数据包.这不会改变世界中的任何方块.voidPlayer.sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) 向该玩家发送一个伪造的牌子(Sign)上的字的更改数据包.这不会改变世界中的任何方块.voidEnderCrystal.setBeamTarget(@Nullable Location location) Sets the location that this end crystal is pointing to.voidPlayer.setBedSpawnLocation(@Nullable Location location) 已过时。名称有误导性.voidPlayer.setBedSpawnLocation(@Nullable Location location, boolean force) 已过时。名称有误导性.voidSets the bound of this entity.voidPlayer.setCompassTarget(@NotNull Location loc) 设置玩家指南针的指向的位置(Location).voidWarden.setDisturbanceLocation(@NotNull Location location) 让监守者感知到指定位置的扰动。void设置蜜蜂盘旋的花的位置.void设置蜜蜂所住蜂巢的位置.void设置此咔嗒嘎的家位置.voidHumanEntity.setLastDeathLocation(@Nullable Location location) 设置玩家上次死亡的位置。voidPlayer.setRespawnLocation(@Nullable Location location) 设置玩家的重生位置.voidPlayer.setRespawnLocation(@Nullable Location location, boolean force) 设置玩家的重生位置.voidEnderSignal.setTargetLocation(@NotNull Location location) 设置末影之眼移向的位置.boolean尝试使实体在指定位置睡觉。boolean尝试让此村民在给定位置睡觉。voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count) 在指定位置产生粒子效果 (the number of times specified by count).voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ) 在指定位置产生粒子效果(按count指定的次数).voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) 在指定位置产生粒子效果(按count指定的次数).<T> voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) Spawns the particle (the number of times specified by count) at the target location.<T> voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) 在指定位置产生粒子效果(按count指定的次数).<T> voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, T data) Spawns the particle (the number of times specified by count) at the target location.<T> voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, T data) 在指定位置产生粒子效果 (the number of times specified by count).voidAllay.startDancing(@NotNull Location location) 使悦灵因指定的唱片机位置而开始跳舞.boolean将此实体传送到给定位置.booleanEntity.teleport(@NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause) 将此实体传送到给定位置. -
org.bukkit.entity.memory中Location的使用
类型参数类型为Location的org.bukkit.entity.memory中的字段修饰符和类型字段说明MemoryKey.HOMEMemoryKey.JOB_SITEMemoryKey.LIKED_NOTEBLOCK_POSITIONMemoryKey.MEETING_POINTMemoryKey.POTENTIAL_JOB_SITE -
org.bukkit.event.block中Location的使用
-
org.bukkit.event.entity中Location的使用
修饰符和类型方法说明EntityTeleportEvent.getFrom()获取实体传送起始位置.EntityExplodeEvent.getLocation()返回爆炸发生的位置.EntityPortalEnterEvent.getLocation()获取实体接触的传送门方块.EntitySpawnEvent.getLocation()获取实体出生的位置.ItemDespawnEvent.getLocation()获取物品消失的位置.EntityTeleportEvent.getTo()获取实体传送目标位置.参数类型为Location的org.bukkit.event.entity中的方法修饰符和类型方法说明void设置实体传送起始位置.void设置实体传送目标位置.参数类型为Location的org.bukkit.event.entity中的构造器限定符构造器说明EntityExplodeEvent(@NotNull Entity what, @NotNull Location location, @NotNull List<Block> blocks, float yield, @NotNull ExplosionResult result) EntityPortalEnterEvent(@NotNull Entity entity, @NotNull Location location) EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius) EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius, boolean canCreatePortal, int creationRadius) EntityPortalExitEvent(@NotNull Entity entity, @NotNull Location from, @NotNull Location to, @NotNull Vector before, @NotNull Vector after) ItemDespawnEvent(@NotNull Item despawnee, @NotNull Location loc) ItemSpawnEvent(@NotNull Item spawnee, Location loc) 已过时。 -
org.bukkit.event.player中Location的使用
修饰符和类型方法说明PlayerMoveEvent.getFrom()得到玩家发生移动前的位置.PlayerSpawnChangeEvent.getNewSpawn()获取要设置的新重生点.PlayerRespawnEvent.getRespawnLocation()获取当前重生的位置.PlayerMoveEvent.getTo()得到玩家移动到的位置.参数类型为Location的org.bukkit.event.player中的方法修饰符和类型方法说明void设置玩家将要移动到此位置之前的位置.voidPlayerSpawnChangeEvent.setNewSpawn(@Nullable Location newSpawn) 设置新的重生点位置.voidPlayerRespawnEvent.setRespawnLocation(@NotNull Location respawnLocation) 设置一个新的重生位置.void设置玩家将要移动的位置.参数类型为Location的org.bukkit.event.player中的构造器限定符构造器说明PlayerPortalEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause) PlayerPortalEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause, int getSearchRadius, boolean canCreatePortal, int creationRadius) PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn) 已过时。PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn) 已过时。PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull PlayerRespawnEvent.RespawnReason respawnReason) PlayerSpawnChangeEvent(@NotNull Player player, @Nullable Location newSpawn, boolean forced, @NotNull PlayerSpawnChangeEvent.Cause cause) PlayerTeleportEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause) -
org.bukkit.event.vehicle中Location的使用
参数类型为Location的org.bukkit.event.vehicle中的构造器 -
org.bukkit.event.world中Location的使用
修饰符和类型方法说明GenericGameEvent.getLocation()获取事件发生所在的位置.StructureGrowEvent.getLocation()获取这个结构的位置.SpawnChangeEvent.getPreviousLocation()获取之前的出生点位置.参数类型为Location的org.bukkit.event.world中的构造器限定符构造器说明GenericGameEvent(@NotNull GameEvent event, @NotNull Location location, @Nullable Entity entity, int radius, boolean isAsync) SpawnChangeEvent(@NotNull World world, @NotNull Location previousLocation) StructureGrowEvent(@NotNull Location location, @NotNull TreeType species, boolean bonemeal, @Nullable Player player, @NotNull List<BlockState> blocks) -
org.bukkit.generator中Location的使用
返回Location的org.bukkit.generator中的方法修饰符和类型方法说明ChunkGenerator.getFixedSpawnLocation(@NotNull World world, @NotNull Random random) 获取一个固定出生方位用于一个指定的世界。参数类型为Location的org.bukkit.generator中的方法 -
org.bukkit.inventory中Location的使用
返回Location的org.bukkit.inventory中的方法参数类型为Location的org.bukkit.inventory中的方法修饰符和类型方法说明ItemFactory.createExplorerMap(@NotNull World world, @NotNull Location structureLocation, MapCursor.Type mapIcon) Create a new explorer map targeting the given structure location. -
org.bukkit.inventory.meta中Location的使用
参数类型为Location的org.bukkit.inventory.meta中的方法 -
org.bukkit.inventory.view.builder中Location的使用
-
org.bukkit.loot中Location的使用
返回Location的org.bukkit.loot中的方法参数类型为Location的org.bukkit.loot中的构造器 -
org.bukkit.structure中Location的使用
参数类型为Location的org.bukkit.structure中的方法修饰符和类型方法说明void从世界中的一个区域填充结构。voidStructure.fill(@NotNull Location origin, @NotNull BlockVector size, boolean includeEntities) 从世界中的一个区域填充结构,从指定的原点开始,沿各轴按指定的尺寸向量扩展。voidStructure.place(@NotNull Location location, boolean includeEntities, @NotNull StructureRotation structureRotation, @NotNull Mirror mirror, int palette, float integrity, @NotNull Random random) 将结构放置到世界中。voidStructure.place(@NotNull Location location, boolean includeEntities, @NotNull StructureRotation structureRotation, @NotNull Mirror mirror, int palette, float integrity, @NotNull Random random, @NotNull Collection<BlockTransformer> blockTransformers, @NotNull Collection<EntityTransformer> entityTransformers) 将结构放置到世界中。 -
org.bukkit.util中Location的使用
返回Location的org.bukkit.util中的方法修饰符和类型方法说明BiomeSearchResult.getLocation()返回生物群系的位置。StructureSearchResult.getLocation()返回结构的位置。Vector.toLocation(@NotNull World world) 将向量转换为 Location, 其自转角(也叫偏航角,Yaw)、旋进角(也叫进动角、俯仰角,Pitch)为0.Vector.toLocation(@NotNull World world, float yaw, float pitch) 将向量转换为 Location.参数类型为Location的org.bukkit.util中的方法修饰符和类型方法说明static @NotNull BoundingBox使用给定中心和范围创建新的边界框。static @NotNull BoundingBox使用给定位置的坐标作为角创建新的边界框。Shifts this bounding box by the given amounts.Expands this bounding box to contain (or border) the specified position.参数类型为Location的org.bukkit.util中的构造器限定符构造器说明BlockIterator的构造函数.BlockIterator(@NotNull Location loc, double yOffset) BlockIterator的构造函数.BlockIterator(@NotNull Location loc, double yOffset, int maxDistance) BlockIterator的构造函数. -
org.spigotmc.event.player中Location的使用
参数类型为Location的org.spigotmc.event.player中的方法修饰符和类型方法说明voidPlayerSpawnLocationEvent.setSpawnLocation(@NotNull Location location) 设置玩家的出生点 (仅在本事件中生效).参数类型为Location的org.spigotmc.event.player中的构造器