类的使用
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()Gets the player's last death location.OfflinePlayer.getLocation()Gets the player's current location.Raid.getLocation()获取袭击的中心位置.Vibration.Destination.BlockDestination.getLocation()Vibration.getOrigin()Get the origin of the vibration.OfflinePlayer.getRespawnLocation()Gets the Location where the player will spawn at, null if they don't have a valid respawn point.World.getSpawnLocation()获取这个世界的默认出生点位置.Particle.Trail.getTarget()The target of the particles to be displayed.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) Creates an entity of a specific class at the givenLocationbut does not spawn it in the world.Bukkit.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) Create a new explorer map targeting the closest nearby structure of a givenStructureType.Bukkit.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored) Create a new explorer map targeting the closest nearby structure of a givenStructureType.Server.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) Create a new explorer map targeting the closest nearby structure of a givenStructureType.Server.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored) Create a new explorer map targeting the closest nearby structure of a givenStructureType.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) Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.booleanWorld.createExplosion(@NotNull Location loc, float power, boolean setFire, boolean breakBlocks, @Nullable Entity source) Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.double获取本位置与与另一个位置之间的距离.doubleLocation.distanceSquared(@NotNull Location o) 获取本位置与与另一个位置之间的距离的平方.在指定的位置丢出一个物品.World.dropItem(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocationNote that functions will run before the entity is spawnedWorld.dropItemNaturally(@NotNull Location location, @NotNull ItemStack item) 在指定的位置丢出一个随机偏移的物品.World.dropItemNaturally(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocationwith a random offset Note that functions will run before the entity is spawnedbooleanRegionAccessor.generateTree(@NotNull Location location, @NotNull Random random, @NotNull TreeType type) Creates a tree at the givenLocationbooleanRegionAccessor.generateTree(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Consumer<? super BlockState> stateConsumer) Creates a tree at the givenLocationbooleanRegionAccessor.generateTree(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Predicate<? super BlockState> statePredicate) Creates a tree at the givenLocationbooleanWorld.generateTree(@NotNull Location location, @NotNull TreeType type) 在指定的位置创建一颗树.booleanWorld.generateTree(@NotNull Location loc, @NotNull TreeType type, @NotNull BlockChangeDelegate delegate) 已过时。this method does not handle tile entities (bee nests)World.getBlockAt(@NotNull Location location) RegionAccessor.getBlockData(@NotNull Location location) RegionAccessor.getBlockState(@NotNull Location location) Gets theBlockStateat the givenLocation.World.getChunkAt(@NotNull Location location) World.getHighestBlockAt(@NotNull Location location) 获取指定位置最高处不是空气且不可逾越的方块.World.getHighestBlockAt(@NotNull Location location, @NotNull HeightMap heightMap) Gets the highest block corresponding to theHeightMapat the given coordinates.intRegionAccessor.getHighestBlockYAt(@NotNull Location location) Gets the highest non-empty (impassable) coordinate at the givenLocation.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) Returns a list of entities within a bounding box centered around a Location.Gets the type of the block at the givenLocation.boolean检查指定的位置是否在这个边界里面.World.locateNearestBiome(@NotNull Location origin, int radius, int horizontalInterval, int verticalInterval, @NotNull Biome... biomes) Find the closest nearby location with a biome matching the providedBiome(s).World.locateNearestBiome(@NotNull Location origin, int radius, @NotNull Biome... biomes) Find the closest nearby location with a biome matching the providedBiome(s).World.locateNearestRaid(@NotNull Location location, int radius) 寻找与给定位置相距最近的袭击.World.locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored) Find the closest nearby structure of a givenStructure.World.locateNearestStructure(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored) Find the closest nearby structure of a givenStructureType.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) 向在以指定位置为圆心的指定半径内的所有玩家施加(给予)一个效果。voidPlay a note at the provided Location in the World.voidPlay a Sound at the provided Location in the World.voidWorld.playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) Play a Sound at the provided Location in the World.voidWorld.playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a Sound at the provided Location in the World.void在世界中指定的位置播放一个声音。voidWorld.playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) Play a Sound at the provided Location in the World.voidWorld.playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed) Play a Sound at the provided Location in the World.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) Creates a new entity at the givenLocationwith the supplied function run before the entity is added to the world.<T extends Entity>
TRegionAccessor.spawn(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<? super T> function) Spawn an entity of a specific class at the givenLocation, with the supplied function run before the entity is added to the world.<T extends LivingEntity>
TWorld.spawn(@NotNull Location location, @NotNull Class<T> clazz, CreatureSpawnEvent.SpawnReason spawnReason, boolean randomizeData, @Nullable Consumer<? super T> function) Creates a new entity at the givenLocationwith the supplied function run before the entity is added to the world.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) Creates an arrow entity of the given class at the givenLocationRegionAccessor.spawnEntity(@NotNull Location location, @NotNull EntityType type) 在指定的位置创建一个实体.RegionAccessor.spawnEntity(@NotNull Location loc, @NotNull EntityType type, boolean randomizeData) Creates a new entity at the givenLocation.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) Spawns the particle (the number of times specified by count) at the target location.voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ) Spawns the particle (the number of times specified by count) at the target location.voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) Spawns the particle (the number of times specified by count) at the target location.<T> voidWorld.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> voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) Spawns the particle (the number of times specified by count) at the target location.<T> voidWorld.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> voidWorld.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, T data) Spawns the particle (the number of times specified by count) at the target location.World.Spigot.strikeLightning(@NotNull Location loc, boolean isSilent) 已过时。sound is now client side and cannot be removedWorld.strikeLightning(@NotNull Location loc) 在指定的位置劈下闪电.World.Spigot.strikeLightningEffect(@NotNull Location loc, boolean isSilent) 已过时。sound is now client side and cannot be removedWorld.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) Looks for the requested command and executes an appropriate tab-completer if found.SimpleCommandMap.tabComplete(@NotNull CommandSender sender, @NotNull String cmdLine, @Nullable Location location) -
org.bukkit.configuration中Location的使用
修饰符和类型方法说明ConfigurationSection.getLocation(@NotNull String path) Gets the requested Location by path.ConfigurationSection.getLocation(@NotNull String path, @Nullable Location def) Gets the requestedLocationby path, returning a default value if not found.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()Get theLocationfrom where the damage originated.DamageSource.getSourceLocation()Get theLocationfrom where the damage originated.参数类型为Location的org.bukkit.damage中的方法修饰符和类型方法说明DamageSource.Builder.withDamageLocation(@NotNull Location location) Set theLocationof the source of damage. -
org.bukkit.entity中Location的使用
返回Location的org.bukkit.entity中的方法修饰符和类型方法说明Sniffer.findPossibleDigLocation()Try to get a possible location where the sniffer can dig.EnderCrystal.getBeamTarget()Gets the location that this end crystal is pointing its beam to.HumanEntity.getBedLocation()Gets the location of the bed the player is currently sleeping inPlayer.getBedSpawnLocation()已过时。Misleading name.Vex.getBound()Gets the bound of this entity.Player.getCompassTarget()得到玩家指南针的指向的位置(Location).LivingEntity.getEyeLocation()获取生物实体眼睛的详细方位的Location对象.Bee.getFlower()获取蜜蜂盘旋的花的位置.Bee.getHive()获取蜜蜂的家(蜂巢)的位置.Creaking.getHome()Gets the home location for this Creaking (ie where its correspondingCreakingHeartcan be).Allay.getJukebox()Gets the jukebox the allay is set to dance to.HumanEntity.getLastDeathLocation()Gets the player's last death location.Entity.getLocation()获取实体当前位置Entity.getLocation(@Nullable Location loc) 将实体的当前位置存储到提供的Location中.Player.getRespawnLocation()Gets the Location where the player will spawn at, null if they don't have a valid respawn point.EnderSignal.getTargetLocation()获取末影之眼移向的位置.返回变量类型为Location的类型的org.bukkit.entity中的方法参数类型为Location的org.bukkit.entity中的方法修饰符和类型方法说明voidSniffer.addExploredLocation(@NotNull Location location) Add a location to the explored locations.Creates a copy of this entity and all its data.EntitySnapshot.createEntity(@NotNull Location to) Creates an entity using this template and spawns it at the provided location.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) Play a sound for a player at the location.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) Play a sound for a player at the location.voidSniffer.removeExploredLocation(@NotNull Location location) Remove a location of the explored locations.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) Send block damage.voidPlayer.sendBlockDamage(@NotNull Location loc, float progress, int sourceId) Send block damage.voidPlayer.sendBlockDamage(@NotNull Location loc, float progress, @NotNull Entity source) Send block damage.voidPlayer.sendBlockUpdate(@NotNull Location loc, @NotNull TileState tileState) Send a TileState change.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) 已过时。Misleading name.voidPlayer.setBedSpawnLocation(@Nullable Location location, boolean force) 已过时。Misleading name.voidSets the bound of this entity.voidPlayer.setCompassTarget(@NotNull Location loc) 设置玩家指南针的指向的位置(Location).voidWarden.setDisturbanceLocation(@NotNull Location location) Make the warden sense a disturbance in the force at the location given.void设置蜜蜂盘旋的花的位置.void设置蜜蜂所住蜂巢的位置.voidSets the home location for this Creaking.voidHumanEntity.setLastDeathLocation(@Nullable Location location) Sets the player's last death location.voidPlayer.setRespawnLocation(@Nullable Location location) Sets the Location where the player will respawn.voidPlayer.setRespawnLocation(@Nullable Location location, boolean force) Sets the Location where the player will respawn.voidEnderSignal.setTargetLocation(@NotNull Location location) 设置末影之眼移向的位置.booleanAttempts to make the entity sleep at the given location.booleanAttempts to make this villager sleep at the given location.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) Spawns the particle (the number of times specified by count) at the target location.voidPlayer.spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) 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) 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) 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, 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) Causes the allay to start dancing because of the provided jukebox 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_SITEMemoryKey.SNIFFER_EXPLORED_POSITIONS -
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()Gets the new spawn to be set.PlayerRespawnEvent.getRespawnLocation()获取当前重生的位置.PlayerMoveEvent.getTo()得到玩家移动到的位置.参数类型为Location的org.bukkit.event.player中的方法修饰符和类型方法说明void设置玩家将要移动到此位置之前的位置.voidPlayerSpawnChangeEvent.setNewSpawn(@Nullable Location newSpawn) Sets the new spawn location.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中的方法修饰符和类型方法说明booleanLimitedRegion.isInRegion(@NotNull Location location) Checks if the givenLocationis in the region. -
org.bukkit.inventory中Location的使用
返回Location的org.bukkit.inventory中的方法 -
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中的方法修饰符和类型方法说明voidFills the structure from an area in a world.voidStructure.fill(@NotNull Location origin, @NotNull BlockVector size, boolean includeEntities) Fills the Structure from an area in a world, starting at the specified origin and extending in each axis according to the specified size vector.voidStructure.place(@NotNull Location location, boolean includeEntities, @NotNull StructureRotation structureRotation, @NotNull Mirror mirror, int palette, float integrity, @NotNull Random random) Place a structure in the world.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) Place a structure in the world. -
org.bukkit.util中Location的使用
返回Location的org.bukkit.util中的方法修饰符和类型方法说明BiomeSearchResult.getLocation()Return the location of the biome.StructureSearchResult.getLocation()Return the location of the structure.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 BoundingBoxCreates a new bounding box using the given center and extents.static @NotNull BoundingBoxCreates a new bounding box using the coordinates of the given locations as corners.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中的构造器