类的使用
org.bukkit.Location
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.各种方块的 BlockData 类.
与创建Boss血量条(出现在玩家客户端屏幕顶部)有关的类.
与处理玩家输入的非聊天消息(即命令)相关的类.
专门用于处理插件运行时配置的类.
Classes concerning damage types and sources applicable to living entities.
为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.与实体的持久化内存有关的类, 目前仅与村民有关.
简化
世界
生成实现的类.参与操作玩家物品栏和物品交互的类.
用于操作可以存储在
物品堆
的额外数据的接口.与战利品表产生与操作有关的类 (Minecraft Wiki - 战利品表).
Classes related to creating or using
structures
without creating Structure
blocks
in the world.提供多种目的和单一目的的类以简化各种编程概念.
Spigot特有的玩家事件.
-
org.bukkit中Location的使用
修饰符和类型方法说明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()
获取这个世界的默认出生点位置
.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坐标数值.修饰符和类型方法说明将本位置的坐标加上另一个位置的坐标.<T extends Entity>
TRegionAccessor.createEntity
(@NotNull Location location, @NotNull Class<T> clazz) Creates an entity of a specific class at the givenLocation
but 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
.boolean
World.createExplosion
(@NotNull Location loc, float power) 在指定坐标生成指定威力的爆炸.boolean
World.createExplosion
(@NotNull Location loc, float power, boolean setFire) 在指定的坐标生成指定威力的爆炸并设置方块是否会着火.boolean
World.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.boolean
World.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
获取本位置与与另一个位置之间的距离.double
Location.distanceSquared
(@NotNull Location o) 获取本位置与与另一个位置之间的距离的平方.在指定的位置
丢出一个物品.World.dropItem
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
Note 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 specifiedLocation
with a random offset Note that functions will run before the entity is spawnedboolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type) Creates a tree at the givenLocation
boolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Consumer<? super BlockState> stateConsumer) Creates a tree at the givenLocation
boolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Predicate<? super BlockState> statePredicate) Creates a tree at the givenLocation
boolean
World.generateTree
(@NotNull Location location, @NotNull TreeType type) 在指定的位置
创建一颗树.boolean
World.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 theBlockState
at 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 theHeightMap
at the given coordinates.int
RegionAccessor.getHighestBlockYAt
(@NotNull Location location) Gets the highest non-empty (impassable) coordinate at the givenLocation
.int
RegionAccessor.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) void
World.playEffect
(@NotNull Location location, @NotNull Effect effect, int data) 向以指定位置为圆心的默认半径内的所有玩家施加(给予)一个效果.void
World.playEffect
(@NotNull Location location, @NotNull Effect effect, int data, int radius) 向在以指定位置为圆心的指定半径内的所有玩家施加(给予)一个效果。<T> void
World.playEffect
(@NotNull Location location, @NotNull Effect effect, T data) 向在以指定位置为圆心的默认半径内的所有玩家施加(给予)一个效果。<T> void
World.playEffect
(@NotNull Location location, @NotNull Effect effect, T data, int radius) 向在以指定位置为圆心的指定半径内的所有玩家施加(给予)一个效果。void
Play a note at the provided Location in the World.void
Play a Sound at the provided Location in the World.void
World.playSound
(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) Play a Sound at the provided Location in the World.void
World.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
在世界中指定的位置播放一个声音。void
World.playSound
(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) Play a Sound at the provided Location in the World.void
World.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) 执行检查实体碰撞的射线跟踪.void
void
RegionAccessor.setBlockData
(@NotNull Location location, @NotNull BlockData blockData) void
设置新的边界中心boolean
World.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 givenLocation
with 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 givenLocation
with 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 givenLocation
RegionAccessor.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) 已过时。不安全的参数void
World.spawnParticle
(@NotNull Particle particle, @NotNull Location location, int count) Spawns the particle (the number of times specified by count) at the target location.void
World.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.void
World.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> void
World.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> void
World.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> void
World.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> void
World.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) 在指定的位置
劈下不会造成伤害的闪电.将本位置的坐标减去另一个位置的坐标.限定符构造器说明BlockDestination
(@NotNull Location block) Vibration
(@NotNull Location origin, @NotNull Vibration.Destination destination, int arrivalTime) -
org.bukkit.block中Location的使用
修饰符和类型方法说明EndGateway.getExitLocation()
获取当实体进入折跃门时被传送到的位置.Beehive.getFlower()
获取花的位置.Block.getLocation()
获取这个方块的位置.Block.getLocation
(@Nullable Location loc) 存储此方块的位置到到给定的位置实例中.BlockState.getLocation()
获取此方块状态的位置.BlockState.getLocation
(@Nullable Location loc) 存储此方块状态的位置到给定的位置实例中.DoubleChest.getLocation()
修饰符和类型方法说明Copies the state to another block as an unplaced BlockState.Block.getLocation
(@Nullable Location loc) 存储此方块的位置到到给定的位置实例中.BlockState.getLocation
(@Nullable Location loc) 存储此方块状态的位置到给定的位置实例中.Block.rayTrace
(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode) Performs a ray trace that checks for collision with this specific block in its current state using its precise collision shape.void
EndGateway.setExitLocation
(@Nullable Location location) 设置进入折跃门时传送的位置.void
设置花的位置. -
org.bukkit.block.data中Location的使用
修饰符和类型方法说明boolean
BlockData.isSupported
(@NotNull Location location) 检查如果此状态下的方块放置在给定的Location
的方块上,它是否会被正常支撑。 -
org.bukkit.boss中Location的使用
-
org.bukkit.command中Location的使用
修饰符和类型方法说明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 requestedLocation
by path, returning a default value if not found.MemorySection.getLocation
(@NotNull String path) MemorySection.getLocation
(@NotNull String path, @Nullable Location def) -
org.bukkit.damage中Location的使用
修饰符和类型方法说明DamageSource.getDamageLocation()
Get theLocation
from where the damage originated.DamageSource.getSourceLocation()
Get theLocation
from where the damage originated.修饰符和类型方法说明DamageSource.Builder.withDamageLocation
(@NotNull Location location) Set theLocation
of the source of damage. -
org.bukkit.entity中Location的使用
修饰符和类型方法说明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()
获取蜜蜂的家(蜂巢)的位置.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()
获取末影之眼移向的位置.修饰符和类型方法说明void
Sniffer.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) 打开一个空白附魔台物品栏界面, 玩家物品栏(背包)在底部.HumanEntity.openWorkbench
(@Nullable Location location, boolean force) 打开一个空白工作台物品栏界面, 玩家物品栏(背包)在底部.void
Player.playEffect
(@NotNull Location loc, @NotNull Effect effect, int data) 已过时。不安全的参数<T> void
Player.playEffect
(@NotNull Location loc, @NotNull Effect effect, T data) void
已过时。不安全的参数void
在指定位置处为玩家播放一个音符.void
向玩家在某个位置播放一个声音.void
Player.playSound
(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) 向玩家在指定位置播放声音.void
Player.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
向玩家在某个位置播放一个声音.void
Player.playSound
(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) 向玩家在指定位置播放声音.void
Player.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.void
Sniffer.removeExploredLocation
(@NotNull Location location) Remove a location of the explored locations.void
Player.sendBlockChange
(@NotNull Location loc, @NotNull BlockData block) 向该玩家发送一个伪造的指定位置的方块(Block
)更改数据包.这不会改变世界中的方块.void
Player.sendBlockChange
(@NotNull Location loc, @NotNull Material material, byte data) 已过时。不安全的参数void
Player.sendBlockDamage
(@NotNull Location loc, float progress) Send block damage.void
Player.sendBlockDamage
(@NotNull Location loc, float progress, int sourceId) Send block damage.void
Player.sendBlockDamage
(@NotNull Location loc, float progress, @NotNull Entity source) Send block damage.void
Player.sendBlockUpdate
(@NotNull Location loc, @NotNull TileState tileState) Send a TileState change.void
Player.sendSignChange
(@NotNull Location loc, @Nullable String[] lines) 向该玩家发送一个伪造的牌子(Sign
)上的字的更改数据包.这不会改变世界中的任何方块.void
向该玩家发送一个伪造的牌子(Sign
)上的字的更改数据包.这不会改变世界中的任何方块.void
Player.sendSignChange
(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) 向该玩家发送一个伪造的牌子(Sign
)上的字的更改数据包.这不会改变世界中的任何方块.void
EnderCrystal.setBeamTarget
(@Nullable Location location) Sets the location that this end crystal is pointing to.void
Player.setBedSpawnLocation
(@Nullable Location location) 已过时。Misleading name.void
Player.setBedSpawnLocation
(@Nullable Location location, boolean force) 已过时。Misleading name.void
Sets the bound of this entity.void
Player.setCompassTarget
(@NotNull Location loc) 设置玩家指南针的指向的位置(Location
).void
Warden.setDisturbanceLocation
(@NotNull Location location) Make the warden sense a disturbance in the force at the location given.void
设置蜜蜂盘旋的花的位置.void
设置蜜蜂所住蜂巢的位置.void
HumanEntity.setLastDeathLocation
(@Nullable Location location) Sets the player's last death location.void
Player.setRespawnLocation
(@Nullable Location location) Sets the Location where the player will respawn.void
Player.setRespawnLocation
(@Nullable Location location, boolean force) Sets the Location where the player will respawn.void
EnderSignal.setTargetLocation
(@NotNull Location location) 设置末影之眼移向的位置.boolean
Attempts to make the entity sleep at the given location.boolean
Attempts to make this villager sleep at the given location.void
Player.spawnParticle
(@NotNull Particle particle, @NotNull Location location, int count) 在指定位置产生粒子效果 (the number of times specified by count).void
Player.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.void
Player.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> void
Player.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> void
Player.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> void
Player.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> void
Player.spawnParticle
(@NotNull Particle particle, @NotNull Location location, int count, T data) 在指定位置产生粒子效果 (the number of times specified by count).void
Allay.startDancing
(@NotNull Location location) Causes the allay to start dancing because of the provided jukebox location.boolean
将此实体传送到给定位置.boolean
Entity.teleport
(@NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause) 将此实体传送到给定位置. -
org.bukkit.entity.memory中Location的使用
修饰符和类型字段说明MemoryKey.HOME
MemoryKey.JOB_SITE
MemoryKey.LIKED_NOTEBLOCK_POSITION
MemoryKey.MEETING_POINT
MemoryKey.POTENTIAL_JOB_SITE
MemoryKey.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()
获取实体传送目标位置.修饰符和类型方法说明void
设置实体传送起始位置.void
设置实体传送目标位置.限定符构造器说明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()
得到玩家移动到的位置.修饰符和类型方法说明void
设置玩家将要移动到此位置之前的位置.void
PlayerSpawnChangeEvent.setNewSpawn
(@Nullable Location newSpawn) Sets the new spawn location.void
PlayerRespawnEvent.setRespawnLocation
(@NotNull Location respawnLocation) 设置一个新的重生位置.void
设置玩家将要移动的位置.限定符构造器说明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的使用
-
org.bukkit.event.world中Location的使用
修饰符和类型方法说明GenericGameEvent.getLocation()
获取事件发生所在的位置.StructureGrowEvent.getLocation()
获取这个结构的位置.SpawnChangeEvent.getPreviousLocation()
获取之前的出生点位置.限定符构造器说明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的使用
修饰符和类型方法说明ChunkGenerator.getFixedSpawnLocation
(@NotNull World world, @NotNull Random random) 获取一个固定出生方位用于一个指定的世界。修饰符和类型方法说明boolean
LimitedRegion.isInRegion
(@NotNull Location location) Checks if the givenLocation
is in the region. -
org.bukkit.inventory中Location的使用
-
org.bukkit.inventory.meta中Location的使用
-
org.bukkit.loot中Location的使用
-
org.bukkit.structure中Location的使用
修饰符和类型方法说明void
Fills the structure from an area in a world.void
Structure.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.void
Structure.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.void
Structure.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的使用
修饰符和类型方法说明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.修饰符和类型方法说明static @NotNull BoundingBox
Creates a new bounding box using the given center and extents.static @NotNull BoundingBox
Creates 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.限定符构造器说明BlockIterator的构造函数.BlockIterator
(@NotNull Location loc, double yOffset) BlockIterator的构造函数.BlockIterator
(@NotNull Location loc, double yOffset, int maxDistance) BlockIterator的构造函数. -
org.spigotmc.event.player中Location的使用
修饰符和类型方法说明void
PlayerSpawnLocationEvent.setSpawnLocation
(@NotNull Location location) 设置玩家的出生点 (仅在本事件中生效).