Package net.glowstone
Class GlowWorld
java.lang.Object
net.glowstone.GlowWorld
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.audience.ForwardingAudience,org.bukkit.Keyed,org.bukkit.metadata.Metadatable,org.bukkit.plugin.messaging.PluginMessageRecipient,org.bukkit.World
A class which represents the in-game world.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
net.kyori.adventure.audience.ForwardingAudience.SingleNested classes/interfaces inherited from interface org.bukkit.World
org.bukkit.World.ChunkLoadCallback, org.bukkit.World.Environment, org.bukkit.World.Spigot -
Constructor Summary
ConstructorsConstructorDescriptionGlowWorld(GlowServer server, org.bukkit.WorldCreator creator, WorldStorageProvider worldStorageProvider) Creates a new world from the options in the given WorldCreator. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPluginChunkTicket(int x, int z, @NotNull org.bukkit.plugin.Plugin plugin) voidbroadcastBlockChangeInRange(GlowChunk.Key chunkKey, BlockChangeMessage message) voidcancelPulse(GlowBlock block) voidcancelPulse(org.bukkit.Location location) booleanbooleancreateExplosion(double x, double y, double z, float power) booleancreateExplosion(double x, double y, double z, float power, boolean setFire) booleancreateExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks) booleancreateExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, @Nullable org.bukkit.entity.Entity source) booleancreateExplosion(@NotNull org.bukkit.Location location, float power, boolean setFire, boolean breakBlocks) booleancreateExplosion(@NotNull org.bukkit.Location location, float power, boolean setFire, boolean breakBlocks, @Nullable org.bukkit.entity.Entity source) booleancreateExplosion(org.bukkit.entity.Entity source, double x, double y, double z, float power, boolean incendiary, boolean breakBlocks) Create an explosion with a specific entity as the source.booleancreateExplosion(org.bukkit.entity.Entity source, org.bukkit.Location loc, float power, boolean setFire, boolean breakBlocks) booleancreateExplosion(org.bukkit.Location loc, float power) booleancreateExplosion(org.bukkit.Location loc, float power, boolean setFire) booleanboolean@NotNull org.bukkit.entity.ItemdropItem(@NotNull org.bukkit.Location location, @NotNull org.bukkit.inventory.ItemStack stack, @Nullable org.bukkit.util.Consumer<org.bukkit.entity.Item> consumer) dropItem(org.bukkit.Location location, org.bukkit.inventory.ItemStack item) Spawn an item at the givenLocationwithout shooting effect.@NotNull org.bukkit.entity.ItemdropItemNaturally(@NotNull org.bukkit.Location location, @NotNull org.bukkit.inventory.ItemStack stack, @Nullable org.bukkit.util.Consumer<org.bukkit.entity.Item> consumer) dropItemNaturally(org.bukkit.Location location, org.bukkit.inventory.ItemStack item) Spawn an item at the givenLocationwith shooting effect.booleanbooleangenerateTree(org.bukkit.Location location, org.bukkit.TreeType type) booleangenerateTree(org.bukkit.Location loc, org.bukkit.TreeType type, org.bukkit.BlockChangeDelegate delegate) booleanbooleanintPer-world spawn limits on ambient mobs (bats).intPer-world spawn limits on passive mobs.org.bukkit.block.BiomegetBiome(int x, int z) @NotNull org.bukkit.block.BiomegetBiome(int x, int y, int z) getBlockAt(int x, int y, int z) getBlockAt(org.bukkit.Location location) org.bukkit.block.data.BlockDatagetBlockDataAt(int x, int y, int z) intReturns the number of block entities in loaded chunkManager.org.bukkit.MaterialgetBlockTypeAt(int x, int y, int z) getChunk(GlowChunk.Key key) getChunkAt(int x, int z) getChunkAt(long chunkKey) org.bukkit.ChunkgetChunkAt(org.bukkit.block.Block block) org.bukkit.ChunkgetChunkAt(org.bukkit.Location location) @NotNull CompletableFuture<org.bukkit.Chunk>getChunkAtAsync(int x, int z, boolean gen) @NotNull CompletableFuture<org.bukkit.Chunk>getChunkAtAsync(int x, int z, boolean gen, boolean urgent) voidgetChunkAtAsync(int x, int z, org.bukkit.World.ChunkLoadCallback cb) voidgetChunkAtAsync(org.bukkit.block.Block block, org.bukkit.World.ChunkLoadCallback cb) voidgetChunkAtAsync(org.bukkit.Location location, org.bukkit.World.ChunkLoadCallback cb) intThe chunk manager.intdoubleorg.bukkit.DifficultyThe world's gameplay difficulty.org.bukkit.ChunkSnapshotgetEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain) @Nullable org.bukkit.boss.DragonBattleList<org.bukkit.entity.Entity><T extends org.bukkit.entity.Entity>
Collection<T>getEntitiesByClass(Class<T> cls) <T extends org.bukkit.entity.Entity>
Collection<T>getEntitiesByClass(Class<T>... classes) Deprecated.Collection<org.bukkit.entity.Entity>getEntitiesByClasses(Class<?>... classes) org.bukkit.entity.EntityintThe entity manager.org.bukkit.World.EnvironmentThe environment.@NotNull Collection<org.bukkit.Chunk>longThe age of the world, in ticks.<T> TgetGameRuleDefault(org.bukkit.GameRule<T> gameRule) The game rules used in this world.String[]getGameRuleValue(@NonNls String rule) <T> TgetGameRuleValue(org.bukkit.GameRule<T> gameRule) longorg.bukkit.generator.ChunkGeneratororg.bukkit.block.BlockgetHighestBlockAt(int x, int z) @NotNull org.bukkit.block.BlockgetHighestBlockAt(int x, int z, @NotNull org.bukkit.HeightMap heightMap) @NotNull org.bukkit.block.BlockgetHighestBlockAt(@NotNull org.bukkit.Location location, @NotNull org.bukkit.HeightMap heightMap) org.bukkit.block.BlockgetHighestBlockAt(org.bukkit.Location location) org.bukkit.block.BlockgetHighestBlockAt(org.bukkit.Location location, org.bukkit.Material... except) Gets the lowest block at the givenLocationsuch that the block and all blocks above it are either air or one of the given materials.intgetHighestBlockYAt(int x, int z) intgetHighestBlockYAt(int x, int z, @NotNull com.destroystokyo.paper.HeightmapType heightmapType) intgetHighestBlockYAt(int x, int z, @NotNull org.bukkit.HeightMap heightMap) intgetHighestBlockYAt(@NotNull org.bukkit.Location location, @NotNull org.bukkit.HeightMap heightMap) intgetHighestBlockYAt(org.bukkit.Location location) doublegetHumidity(int x, int z) doublegetHumidity(int x, int y, int z) @NotNull Collection<org.bukkit.Material>boolean@NotNull org.bukkit.NamespacedKeygetKey()List<org.bukkit.entity.LivingEntity>org.bukkit.Chunk[]intThe maximum height at which players may place blocks.List<org.bukkit.metadata.MetadataValue>getMetadata(String metadataKey) intintPer-world spawn limits on hostile mobs.io.papermc.paper.world.MoonPhasedoubleReturns the fraction of the moon that is illuminated, ranging from 0.0 at new moon to 1.0 at full moon.getName()The name of this world.@NotNull Collection<org.bukkit.entity.Entity>getNearbyEntities(@NotNull org.bukkit.Location location, double v, double v1, double v2, @Nullable Predicate<org.bukkit.entity.Entity> predicate) @NotNull Collection<org.bukkit.entity.Entity>getNearbyEntities(@NotNull org.bukkit.util.BoundingBox boundingBox) @NotNull Collection<org.bukkit.entity.Entity>getNearbyEntities(@NotNull org.bukkit.util.BoundingBox boundingBox, @Nullable Predicate<org.bukkit.entity.Entity> predicate) Collection<org.bukkit.entity.Entity>getNearbyEntities(org.bukkit.Location location, double x, double y, double z) Returns a list of entities within a bounding box centered around a Location.intintList<org.bukkit.entity.Player>@NotNull Map<org.bukkit.plugin.Plugin,Collection<org.bukkit.Chunk>> @NotNull Collection<org.bukkit.plugin.Plugin>getPluginChunkTickets(int x, int z) List<org.bukkit.generator.BlockPopulator>booleangetPVP()@NotNull List<org.bukkit.Raid>getRaids()floatThe rain density on the current world tick.intlonggetSeed()The world seed.byte[]The SHA-256 hash of the world seed.Get the world's parent server.floatThe sky darkness on the current world tick.org.bukkit.LocationThe storage provider for the world.doublegetTemperature(int x, int z) doublegetTemperature(int x, int y, int z) intHow many ticks until the thundering status is expected to change.intReturns the number of tickable block entities in loaded chunkManager.intDeprecated.ConcurrentSet<org.bukkit.Location>longlonglonglonglongintDeprecated.longgetTime()The current world time.getUID()intPer-world view distance.intPer-world spawn limits on water ambient mobs.intPer-world spawn limits on water mobs.intHow many ticks until the rain/snow status is expected to change.The world border.Get the world folder.org.bukkit.WorldTypeThe world type.booleaninthashCode()booleanhasMetadata(String metadataKey) booleanhasRaids()booleanbooleanhasStorm()booleanThe check to autosave.booleanisChunkForceLoaded(int x, int z) booleanisChunkGenerated(int x, int z) booleanisChunkInUse(int x, int z) booleanisChunkLoaded(int x, int z) booleanisChunkLoaded(org.bukkit.Chunk chunk) booleanbooleanbooleanbooleanisGameRule(String rule) booleanPer-world hardcore setting.booleanWhether the world has been initialized (i.e.booleanbooleanbooleanWhether it is currently thundering on this world.booleanvoidloadChunk(int x, int z) booleanloadChunk(int x, int z, boolean generate) voidloadChunk(org.bukkit.Chunk chunk) @Nullable org.bukkit.LocationlocateNearestBiome(@NotNull org.bukkit.Location location, @NotNull org.bukkit.block.Biome biome, int i) @Nullable org.bukkit.LocationlocateNearestBiome(@NotNull org.bukkit.Location location, @NotNull org.bukkit.block.Biome biome, int i, int i1) @Nullable org.bukkit.RaidlocateNearestRaid(@NotNull org.bukkit.Location location, int radius) @Nullable org.bukkit.LocationlocateNearestStructure(@NotNull org.bukkit.Location location, @NotNull org.bukkit.StructureType structureType, int i, boolean b) newChunkLock(@NonNls String desc) Get a new chunk lock object a player or other party can use to keep chunkManager loaded.voidplayEffect(org.bukkit.Location location, org.bukkit.Effect effect, int data) voidplayEffect(org.bukkit.Location location, org.bukkit.Effect effect, int data, int radius) <T> voidplayEffect(org.bukkit.Location location, org.bukkit.Effect effect, T data) <T> voidplayEffect(org.bukkit.Location location, org.bukkit.Effect effect, T data, int radius) voidplayEffectExceptTo(org.bukkit.Location location, org.bukkit.Effect effect, int data, int radius, org.bukkit.entity.Player exclude) Plays an effect to all but one player within a given radius around a location.voidvoidplaySound(org.bukkit.Location location, String sound, org.bukkit.SoundCategory category, float volume, float pitch) voidplaySound(org.bukkit.Location location, org.bukkit.Sound sound, float volume, float pitch) voidplaySound(org.bukkit.Location location, org.bukkit.Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) voidpulse()Updates all the entities within this world.@Nullable org.bukkit.util.RayTraceResultrayTrace(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, double v, @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode, boolean b, double v1, @Nullable Predicate<org.bukkit.entity.Entity> predicate) floatrayTrace(org.bukkit.Location location, GlowEntity entity) Calculates how much the rays from the location to the entity's bounding box is blocked.@Nullable org.bukkit.util.RayTraceResultrayTraceBlocks(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, double v) @Nullable org.bukkit.util.RayTraceResultrayTraceBlocks(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, double v, @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode) @Nullable org.bukkit.util.RayTraceResultrayTraceBlocks(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, double v, @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode, boolean b) @Nullable org.bukkit.util.RayTraceResultrayTraceEntities(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, double v) @Nullable org.bukkit.util.RayTraceResultrayTraceEntities(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, double v, double v1) @Nullable org.bukkit.util.RayTraceResultrayTraceEntities(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, double v, double v1, @Nullable Predicate<org.bukkit.entity.Entity> predicate) @Nullable org.bukkit.util.RayTraceResultrayTraceEntities(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, double v, @Nullable Predicate<org.bukkit.entity.Entity> predicate) booleanrefreshChunk(int x, int z) booleanregenerateChunk(int x, int z) voidremoveMetadata(String metadataKey, org.bukkit.plugin.Plugin owningPlugin) booleanremovePluginChunkTicket(int x, int z, @NotNull org.bukkit.plugin.Plugin plugin) voidremovePluginChunkTickets(@NotNull org.bukkit.plugin.Plugin plugin) voidrequestPulse(GlowBlock block) voidrequestPulse(org.bukkit.Location location) voidsave()voidsave(boolean async) Saves world to disk synchronously or asynchronously.voidsendPluginMessage(org.bukkit.plugin.Plugin source, String channel, byte[] message) voidsetAmbientSpawnLimit(int ambientSpawnLimit) Per-world spawn limits on ambient mobs (bats).voidsetAnimalSpawnLimit(int animalSpawnLimit) Per-world spawn limits on passive mobs.voidsetAutoSave(boolean autoSave) The check to autosave.voidsetBiome(int x, int y, int z, @NotNull org.bukkit.block.Biome biome) voidsetBiome(int x, int z, @NotNull org.bukkit.block.Biome bio) voidsetChunkForceLoaded(int x, int z, boolean forced) voidsetClearWeatherDuration(int i) voidsetDifficulty(org.bukkit.Difficulty difficulty) voidsetFullTime(long fullTime) The age of the world, in ticks.<T> booleansetGameRule(org.bukkit.GameRule<T> gameRule, T t) booleansetGameRuleValue(@NonNls String rule, String value) voidsetHardcore(boolean hardcore) Per-world hardcore setting.voidsetKeepSpawnInMemory(boolean keepLoaded) voidsetMetadata(String metadataKey, org.bukkit.metadata.MetadataValue newMetadataValue) voidsetMonsterSpawnLimit(int monsterSpawnLimit) Per-world spawn limits on hostile mobs.voidsetNoTickViewDistance(int viewDistance) voidsetPVP(boolean pvp) voidsetSpawnFlags(boolean allowMonsters, boolean allowAnimals) booleansetSpawnLocation(int x, int y, int z) booleansetSpawnLocation(int x, int y, int z, boolean anchor) booleansetSpawnLocation(int x, int y, int z, float angle) booleansetSpawnLocation(org.bukkit.Location newSpawn) booleansetSpawnLocation(org.bukkit.Location newSpawn, boolean anchor) Sets the spawn location of the world.voidsetStorm(boolean hasStorm) voidsetThunderDuration(int thunderDuration) How many ticks until the thundering status is expected to change.voidsetThundering(boolean thundering) voidsetTicksPerAmbientSpawns(int ticksPerAmbientSpawns) Ticks between when ambient mobs are spawned.voidsetTicksPerAnimalSpawns(int ticksPerAnimalSpawns) Ticks between when passive mobs are spawned.voidsetTicksPerMonsterSpawns(int ticksPerMonsterSpawns) Ticks between when hostile mobs are spawned.voidsetTicksPerWaterAmbientSpawns(int ticksPerWaterAmbientSpawns) Ticks between when ambient water mobs are spawned.voidsetTicksPerWaterSpawns(int ticksPerWaterSpawns) Ticks between when water mobs are spawned.voidsetTime(long time) voidsetViewDistance(int viewDistance) Per-world view distance.voidsetWaterAmbientSpawnLimit(int waterAmbientSpawnLimit) Per-world spawn limits on water ambient mobs.voidsetWaterAnimalSpawnLimit(int waterAnimalSpawnLimit) Per-world spawn limits on water mobs.voidsetWeatherDuration(int weatherDuration) How many ticks until the rain/snow status is expected to change.voidsetWorldType(org.bukkit.WorldType worldType) The world type.voidshowParticle(org.bukkit.Location loc, org.bukkit.Effect particle, float offsetX, float offsetY, float offsetZ, float speed, int amount) Displays the given particle to all players.voidshowParticle(org.bukkit.Location loc, org.bukkit.Effect particle, int id, int data, float offsetX, float offsetY, float offsetZ, float speed, int amount, int radius) Displays the given particle to all players.<T extends org.bukkit.entity.Entity>
T<T extends org.bukkit.entity.Entity>
T<T extends org.bukkit.entity.Entity>
Tspawn(org.bukkit.Location location, Class<T> clazz, org.bukkit.util.Consumer<T> function, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) <T extends org.bukkit.entity.AbstractArrow>
TspawnArrow(@NotNull org.bukkit.Location location, @NotNull org.bukkit.util.Vector vector, float speed, float spread, @NotNull Class<T> clazz) org.bukkit.entity.ArrowspawnArrow(org.bukkit.Location location, org.bukkit.util.Vector velocity, float speed, float spread) <T extends org.bukkit.entity.Entity>
TspawnCustomEntity(org.bukkit.Location location, String id) Spawn a custom entity at the givenLocation.<T extends org.bukkit.entity.Entity>
TspawnCustomEntity(org.bukkit.Location location, String id, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) Spawn a custom entity at the givenLocation, with the givenCreatureSpawnEvent.SpawnReason.org.bukkit.entity.EntityspawnEntity(org.bukkit.Location loc, org.bukkit.entity.EntityType type) org.bukkit.entity.FallingBlockspawnFallingBlock(org.bukkit.Location location, org.bukkit.block.data.BlockData blockData) org.bukkit.entity.FallingBlockspawnFallingBlock(org.bukkit.Location location, org.bukkit.material.MaterialData data) org.bukkit.entity.FallingBlockspawnFallingBlock(org.bukkit.Location location, org.bukkit.Material material, byte data) Deprecated.<T extends GlowEntity,E extends org.bukkit.entity.Entity>
GlowEntityspawnGlowEntity(org.bukkit.Location location, Class<T> clazz, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, @Nullable org.bukkit.util.Consumer<E> function) Spawns an entity.<T> voidspawnParticle(@NotNull org.bukkit.Particle particle, double v, double v1, double v2, int i, double v3, double v4, double v5, double v6, T t, boolean b) <T> voidspawnParticle(@NotNull org.bukkit.Particle particle, @NotNull org.bukkit.Location location, int i, double v, double v1, double v2, double v3, T t, boolean b) <T> voidspawnParticle(@NotNull org.bukkit.Particle particle, @Nullable List<org.bukkit.entity.Player> list, @Nullable org.bukkit.entity.Player player, double v, double v1, double v2, int i, double v3, double v4, double v5, double v6, T t, boolean b) voidspawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count) voidspawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) voidspawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> voidspawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> voidspawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) <T> voidspawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, T data) <T> voidspawnParticle(org.bukkit.Particle particle, List<org.bukkit.entity.Player> receivers, org.bukkit.entity.Player source, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) voidspawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count) voidspawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ) voidspawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> voidspawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> voidspawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, T data) <T> voidspawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, T data) org.bukkit.World.Spigotspigot()strikeLightning(org.bukkit.Location loc) strikeLightningEffect(org.bukkit.Location loc) toString()booleanunload()Unloads the world.booleanunloadChunk(int x, int z) booleanunloadChunk(int x, int z, boolean save) booleanunloadChunk(int x, int z, boolean save, boolean safe) booleanunloadChunk(org.bukkit.Chunk chunk) booleanunloadChunkRequest(int x, int z) booleanunloadChunkRequest(int x, int z, boolean safe) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
openBook, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooterMethods inherited from interface net.kyori.adventure.audience.ForwardingAudience
clearTitle, hideBossBar, openBook, playSound, playSound, resetTitle, sendActionBar, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, showBossBar, showTitle, stopSoundMethods inherited from interface org.bukkit.World
audiences, createExplosion, createExplosion, createExplosion, createExplosion, createExplosion, getBlockAtKey, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsyncUrgently, getChunkAtAsyncUrgently, getChunkAtAsyncUrgently, getChunkAtAsyncUrgently, getChunkAtAsyncUrgently, getHighestBlockAt, getHighestBlockAt, getHighestBlockYAt, getLocationAtKey, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, isChunkGenerated, spawn, spawn, spawnEntity, spawnEntity
-
Constructor Details
-
GlowWorld
public GlowWorld(GlowServer server, org.bukkit.WorldCreator creator, WorldStorageProvider worldStorageProvider) Creates a new world from the options in the given WorldCreator.- Parameters:
server- The server for the world.creator- The WorldCreator to use.worldStorageProvider- The storage provider to use.
-
-
Method Details
-
newChunkLock
Get a new chunk lock object a player or other party can use to keep chunkManager loaded.- Parameters:
desc- A description for this chunk lock.- Returns:
- The ChunkLock.
-
pulse
public void pulse()Updates all the entities within this world. -
broadcastBlockChangeInRange
-
rayTrace
Calculates how much the rays from the location to the entity's bounding box is blocked.- Parameters:
location- The location for the rays to startentity- The entity that's bounding box is the ray's end point- Returns:
- a value between 0 and 1, where 0 = all rays blocked and 1 = all rays unblocked
-
rayTrace
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTrace(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, double v, @NotNull @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode, boolean b, double v1, @Nullable @Nullable Predicate<org.bukkit.entity.Entity> predicate) - Specified by:
rayTracein interfaceorg.bukkit.World
-
getMoonPhase
public io.papermc.paper.world.MoonPhase getMoonPhase()- Specified by:
getMoonPhasein interfaceorg.bukkit.World
-
getMoonPhaseFraction
public double getMoonPhaseFraction()Returns the fraction of the moon that is illuminated, ranging from 0.0 at new moon to 1.0 at full moon. Always a multiple of 0.25. See Moon Phases at Gamepedia.- Returns:
- the fraction of the moon that is illuminated
-
getRawPlayers
-
getPlayers
- Specified by:
getPlayersin interfaceorg.bukkit.World
-
getEntity
- Specified by:
getEntityin interfaceorg.bukkit.World
-
getNearbyEntities
public Collection<org.bukkit.entity.Entity> getNearbyEntities(org.bukkit.Location location, double x, double y, double z) Returns a list of entities within a bounding box centered around a Location.Some implementations may impose artificial restrictions on the size of the search bounding box.
- Specified by:
getNearbyEntitiesin interfaceorg.bukkit.World- Parameters:
location- The center of the bounding boxx- 1/2 the size of the box along x axisy- 1/2 the size of the box along y axisz- 1/2 the size of the box along z axis- Returns:
- the collection of entities near location. This will always be a non-null collection.
-
getNearbyEntities
@NotNull public @NotNull Collection<org.bukkit.entity.Entity> getNearbyEntities(@NotNull @NotNull org.bukkit.Location location, double v, double v1, double v2, @Nullable @Nullable Predicate<org.bukkit.entity.Entity> predicate) - Specified by:
getNearbyEntitiesin interfaceorg.bukkit.World
-
getNearbyEntities
@NotNull public @NotNull Collection<org.bukkit.entity.Entity> getNearbyEntities(@NotNull org.bukkit.util.BoundingBox boundingBox) - Specified by:
getNearbyEntitiesin interfaceorg.bukkit.World
-
getNearbyEntities
@NotNull public @NotNull Collection<org.bukkit.entity.Entity> getNearbyEntities(@NotNull org.bukkit.util.BoundingBox boundingBox, @Nullable @Nullable Predicate<org.bukkit.entity.Entity> predicate) - Specified by:
getNearbyEntitiesin interfaceorg.bukkit.World
-
rayTraceEntities
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceEntities(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, double v) - Specified by:
rayTraceEntitiesin interfaceorg.bukkit.World
-
rayTraceEntities
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceEntities(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, double v, double v1) - Specified by:
rayTraceEntitiesin interfaceorg.bukkit.World
-
rayTraceEntities
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceEntities(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, double v, @Nullable @Nullable Predicate<org.bukkit.entity.Entity> predicate) - Specified by:
rayTraceEntitiesin interfaceorg.bukkit.World
-
rayTraceEntities
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceEntities(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, double v, double v1, @Nullable @Nullable Predicate<org.bukkit.entity.Entity> predicate) - Specified by:
rayTraceEntitiesin interfaceorg.bukkit.World
-
rayTraceBlocks
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceBlocks(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, double v) - Specified by:
rayTraceBlocksin interfaceorg.bukkit.World
-
rayTraceBlocks
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceBlocks(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, double v, @NotNull @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode) - Specified by:
rayTraceBlocksin interfaceorg.bukkit.World
-
rayTraceBlocks
@Nullable public @Nullable org.bukkit.util.RayTraceResult rayTraceBlocks(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, double v, @NotNull @NotNull org.bukkit.FluidCollisionMode fluidCollisionMode, boolean b) - Specified by:
rayTraceBlocksin interfaceorg.bukkit.World
-
getEntities
- Specified by:
getEntitiesin interfaceorg.bukkit.World
-
getLivingEntities
- Specified by:
getLivingEntitiesin interfaceorg.bukkit.World
-
getEntitiesByClass
@Deprecated public <T extends org.bukkit.entity.Entity> Collection<T> getEntitiesByClass(Class<T>... classes) Deprecated.- Specified by:
getEntitiesByClassin interfaceorg.bukkit.World
-
getEntitiesByClass
- Specified by:
getEntitiesByClassin interfaceorg.bukkit.World
-
getEntitiesByClasses
- Specified by:
getEntitiesByClassesin interfaceorg.bukkit.World
-
getSpawnLocation
public org.bukkit.Location getSpawnLocation()- Specified by:
getSpawnLocationin interfaceorg.bukkit.World
-
setSpawnLocation
public boolean setSpawnLocation(org.bukkit.Location newSpawn) - Specified by:
setSpawnLocationin interfaceorg.bukkit.World
-
setSpawnLocation
public boolean setSpawnLocation(int x, int y, int z, float angle) - Specified by:
setSpawnLocationin interfaceorg.bukkit.World
-
setSpawnLocation
public boolean setSpawnLocation(int x, int y, int z) - Specified by:
setSpawnLocationin interfaceorg.bukkit.World
-
setSpawnLocation
public boolean setSpawnLocation(org.bukkit.Location newSpawn, boolean anchor) Sets the spawn location of the world.- Parameters:
newSpawn- the new spawn locationanchor- if true, the spawn is never unloaded while the world is running- Returns:
- true if the spawn location has changed
-
setSpawnLocation
public boolean setSpawnLocation(int x, int y, int z, boolean anchor) -
getPVP
public boolean getPVP()- Specified by:
getPVPin interfaceorg.bukkit.World
-
setPVP
public void setPVP(boolean pvp) - Specified by:
setPVPin interfaceorg.bukkit.World
-
getKeepSpawnInMemory
public boolean getKeepSpawnInMemory()- Specified by:
getKeepSpawnInMemoryin interfaceorg.bukkit.World
-
setKeepSpawnInMemory
public void setKeepSpawnInMemory(boolean keepLoaded) - Specified by:
setKeepSpawnInMemoryin interfaceorg.bukkit.World
-
setDifficulty
public void setDifficulty(org.bukkit.Difficulty difficulty) - Specified by:
setDifficultyin interfaceorg.bukkit.World
-
setSpawnFlags
public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals) - Specified by:
setSpawnFlagsin interfaceorg.bukkit.World
-
getAllowAnimals
public boolean getAllowAnimals()- Specified by:
getAllowAnimalsin interfaceorg.bukkit.World
-
getAllowMonsters
public boolean getAllowMonsters()- Specified by:
getAllowMonstersin interfaceorg.bukkit.World
-
getUID
- Specified by:
getUIDin interfaceorg.bukkit.World
-
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevelin interfaceorg.bukkit.World
-
canGenerateStructures
public boolean canGenerateStructures()- Specified by:
canGenerateStructuresin interfaceorg.bukkit.World
-
getTicksPerAnimalSpawns
public long getTicksPerAnimalSpawns()- Specified by:
getTicksPerAnimalSpawnsin interfaceorg.bukkit.World
-
getTicksPerMonsterSpawns
public long getTicksPerMonsterSpawns()- Specified by:
getTicksPerMonsterSpawnsin interfaceorg.bukkit.World
-
getTicksPerWaterSpawns
public long getTicksPerWaterSpawns()- Specified by:
getTicksPerWaterSpawnsin interfaceorg.bukkit.World
-
getTicksPerWaterAmbientSpawns
public long getTicksPerWaterAmbientSpawns()- Specified by:
getTicksPerWaterAmbientSpawnsin interfaceorg.bukkit.World
-
getTicksPerAmbientSpawns
public long getTicksPerAmbientSpawns()- Specified by:
getTicksPerAmbientSpawnsin interfaceorg.bukkit.World
-
save
public void save()- Specified by:
savein interfaceorg.bukkit.World
-
save
public void save(boolean async) Saves world to disk synchronously or asynchronously.- Parameters:
async- if true, save asynchronously
-
getGenerator
public org.bukkit.generator.ChunkGenerator getGenerator()- Specified by:
getGeneratorin interfaceorg.bukkit.World
-
getPopulators
- Specified by:
getPopulatorsin interfaceorg.bukkit.World
-
generateTree
public boolean generateTree(org.bukkit.Location location, org.bukkit.TreeType type) - Specified by:
generateTreein interfaceorg.bukkit.World
-
generateTree
public boolean generateTree(org.bukkit.Location loc, org.bukkit.TreeType type, org.bukkit.BlockChangeDelegate delegate) - Specified by:
generateTreein interfaceorg.bukkit.World
-
getStructures
-
getEntityCount
public int getEntityCount()- Specified by:
getEntityCountin interfaceorg.bukkit.World
-
getTileEntityCount
Deprecated.- Specified by:
getTileEntityCountin interfaceorg.bukkit.World
-
getBlockEntityCount
public int getBlockEntityCount()Returns the number of block entities in loaded chunkManager.- Returns:
- the number of block entities
-
getTickableTileEntityCount
Deprecated.- Specified by:
getTickableTileEntityCountin interfaceorg.bukkit.World
-
getTickableBlockEntityCount
public int getTickableBlockEntityCount()Returns the number of tickable block entities in loaded chunkManager.- Returns:
- the number of tickable block entities
-
getChunkCount
public int getChunkCount()- Specified by:
getChunkCountin interfaceorg.bukkit.World
-
getPlayerCount
public int getPlayerCount()- Specified by:
getPlayerCountin interfaceorg.bukkit.World
-
getBlockAt
- Specified by:
getBlockAtin interfaceorg.bukkit.World
-
getBlockAt
- Specified by:
getBlockAtin interfaceorg.bukkit.World
-
getBlockTypeAt
public org.bukkit.Material getBlockTypeAt(int x, int y, int z) -
getBlockDataAt
public org.bukkit.block.data.BlockData getBlockDataAt(int x, int y, int z) -
getHighestBlockYAt
public int getHighestBlockYAt(org.bukkit.Location location) - Specified by:
getHighestBlockYAtin interfaceorg.bukkit.World
-
getHighestBlockYAt
public int getHighestBlockYAt(int x, int z, @NotNull @NotNull com.destroystokyo.paper.HeightmapType heightmapType) - Specified by:
getHighestBlockYAtin interfaceorg.bukkit.World
-
getHighestBlockYAt
public int getHighestBlockYAt(int x, int z, @NotNull @NotNull org.bukkit.HeightMap heightMap) - Specified by:
getHighestBlockYAtin interfaceorg.bukkit.World
-
getHighestBlockYAt
public int getHighestBlockYAt(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.HeightMap heightMap) - Specified by:
getHighestBlockYAtin interfaceorg.bukkit.World
-
getHighestBlockYAt
public int getHighestBlockYAt(int x, int z) - Specified by:
getHighestBlockYAtin interfaceorg.bukkit.World
-
getHighestBlockAt
@NotNull public @NotNull org.bukkit.block.Block getHighestBlockAt(int x, int z, @NotNull @NotNull org.bukkit.HeightMap heightMap) - Specified by:
getHighestBlockAtin interfaceorg.bukkit.World
-
getHighestBlockAt
@NotNull public @NotNull org.bukkit.block.Block getHighestBlockAt(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.HeightMap heightMap) - Specified by:
getHighestBlockAtin interfaceorg.bukkit.World
-
getHighestBlockAt
public org.bukkit.block.Block getHighestBlockAt(int x, int z) - Specified by:
getHighestBlockAtin interfaceorg.bukkit.World
-
getHighestBlockAt
public org.bukkit.block.Block getHighestBlockAt(org.bukkit.Location location) - Specified by:
getHighestBlockAtin interfaceorg.bukkit.World
-
getHighestBlockAt
public org.bukkit.block.Block getHighestBlockAt(org.bukkit.Location location, org.bukkit.Material... except) Gets the lowest block at the givenLocationsuch that the block and all blocks above it are either air or one of the given materials.- Parameters:
location- Coordinates to get the highest blockexcept- Blocks to exclude in addition to air- Returns:
- Highest non-empty block
-
getChunkAt
- Specified by:
getChunkAtin interfaceorg.bukkit.World
-
getChunkAt
public org.bukkit.Chunk getChunkAt(org.bukkit.Location location) - Specified by:
getChunkAtin interfaceorg.bukkit.World
-
getChunkAt
- Specified by:
getChunkAtin interfaceorg.bukkit.World
-
getChunkAt
public org.bukkit.Chunk getChunkAt(org.bukkit.block.Block block) - Specified by:
getChunkAtin interfaceorg.bukkit.World
-
getChunk
-
getChunkAtAsync
public void getChunkAtAsync(int x, int z, org.bukkit.World.ChunkLoadCallback cb) - Specified by:
getChunkAtAsyncin interfaceorg.bukkit.World
-
getChunkAtAsync
public void getChunkAtAsync(org.bukkit.Location location, org.bukkit.World.ChunkLoadCallback cb) - Specified by:
getChunkAtAsyncin interfaceorg.bukkit.World
-
getChunkAtAsync
public void getChunkAtAsync(org.bukkit.block.Block block, org.bukkit.World.ChunkLoadCallback cb) - Specified by:
getChunkAtAsyncin interfaceorg.bukkit.World
-
getChunkAtAsync
@NotNull public @NotNull CompletableFuture<org.bukkit.Chunk> getChunkAtAsync(int x, int z, boolean gen) - Specified by:
getChunkAtAsyncin interfaceorg.bukkit.World
-
getChunkAtAsync
@NotNull public @NotNull CompletableFuture<org.bukkit.Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) - Specified by:
getChunkAtAsyncin interfaceorg.bukkit.World
-
getKey
@NotNull public @NotNull org.bukkit.NamespacedKey getKey()- Specified by:
getKeyin interfaceorg.bukkit.Keyed- Specified by:
getKeyin interfaceorg.bukkit.World
-
isChunkLoaded
public boolean isChunkLoaded(org.bukkit.Chunk chunk) - Specified by:
isChunkLoadedin interfaceorg.bukkit.World
-
isChunkLoaded
public boolean isChunkLoaded(int x, int z) - Specified by:
isChunkLoadedin interfaceorg.bukkit.World
-
isChunkGenerated
public boolean isChunkGenerated(int x, int z) - Specified by:
isChunkGeneratedin interfaceorg.bukkit.World
-
isChunkInUse
public boolean isChunkInUse(int x, int z) - Specified by:
isChunkInUsein interfaceorg.bukkit.World
-
getLoadedChunks
public org.bukkit.Chunk[] getLoadedChunks()- Specified by:
getLoadedChunksin interfaceorg.bukkit.World
-
loadChunk
public void loadChunk(org.bukkit.Chunk chunk) - Specified by:
loadChunkin interfaceorg.bukkit.World
-
loadChunk
public void loadChunk(int x, int z) - Specified by:
loadChunkin interfaceorg.bukkit.World
-
loadChunk
public boolean loadChunk(int x, int z, boolean generate) - Specified by:
loadChunkin interfaceorg.bukkit.World
-
unloadChunk
public boolean unloadChunk(org.bukkit.Chunk chunk) - Specified by:
unloadChunkin interfaceorg.bukkit.World
-
unloadChunk
public boolean unloadChunk(int x, int z) - Specified by:
unloadChunkin interfaceorg.bukkit.World
-
unloadChunk
public boolean unloadChunk(int x, int z, boolean save) - Specified by:
unloadChunkin interfaceorg.bukkit.World
-
unloadChunk
public boolean unloadChunk(int x, int z, boolean save, boolean safe) -
unloadChunkRequest
public boolean unloadChunkRequest(int x, int z) - Specified by:
unloadChunkRequestin interfaceorg.bukkit.World
-
unloadChunkRequest
public boolean unloadChunkRequest(int x, int z, boolean safe) -
regenerateChunk
public boolean regenerateChunk(int x, int z) - Specified by:
regenerateChunkin interfaceorg.bukkit.World
-
refreshChunk
public boolean refreshChunk(int x, int z) - Specified by:
refreshChunkin interfaceorg.bukkit.World
-
isChunkForceLoaded
public boolean isChunkForceLoaded(int x, int z) - Specified by:
isChunkForceLoadedin interfaceorg.bukkit.World
-
setChunkForceLoaded
public void setChunkForceLoaded(int x, int z, boolean forced) - Specified by:
setChunkForceLoadedin interfaceorg.bukkit.World
-
getForceLoadedChunks
- Specified by:
getForceLoadedChunksin interfaceorg.bukkit.World
-
addPluginChunkTicket
public boolean addPluginChunkTicket(int x, int z, @NotNull @NotNull org.bukkit.plugin.Plugin plugin) - Specified by:
addPluginChunkTicketin interfaceorg.bukkit.World
-
removePluginChunkTicket
public boolean removePluginChunkTicket(int x, int z, @NotNull @NotNull org.bukkit.plugin.Plugin plugin) - Specified by:
removePluginChunkTicketin interfaceorg.bukkit.World
-
removePluginChunkTickets
public void removePluginChunkTickets(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) - Specified by:
removePluginChunkTicketsin interfaceorg.bukkit.World
-
getPluginChunkTickets
- Specified by:
getPluginChunkTicketsin interfaceorg.bukkit.World
-
getPluginChunkTickets
@NotNull public @NotNull Map<org.bukkit.plugin.Plugin,Collection<org.bukkit.Chunk>> getPluginChunkTickets()- Specified by:
getPluginChunkTicketsin interfaceorg.bukkit.World
-
getEmptyChunkSnapshot
public org.bukkit.ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain) - Specified by:
getEmptyChunkSnapshotin interfaceorg.bukkit.World
-
getBiome
public org.bukkit.block.Biome getBiome(int x, int z) - Specified by:
getBiomein interfaceorg.bukkit.World
-
getBiome
@NotNull public @NotNull org.bukkit.block.Biome getBiome(int x, int y, int z) - Specified by:
getBiomein interfaceorg.bukkit.World
-
setBiome
public void setBiome(int x, int z, @NotNull @NotNull org.bukkit.block.Biome bio) - Specified by:
setBiomein interfaceorg.bukkit.World
-
setBiome
public void setBiome(int x, int y, int z, @NotNull @NotNull org.bukkit.block.Biome biome) - Specified by:
setBiomein interfaceorg.bukkit.World
-
getTemperature
public double getTemperature(int x, int z) - Specified by:
getTemperaturein interfaceorg.bukkit.World
-
getTemperature
public double getTemperature(int x, int y, int z) - Specified by:
getTemperaturein interfaceorg.bukkit.World
-
getHumidity
public double getHumidity(int x, int z) - Specified by:
getHumidityin interfaceorg.bukkit.World
-
getHumidity
public double getHumidity(int x, int y, int z) - Specified by:
getHumidityin interfaceorg.bukkit.World
-
getMinHeight
public int getMinHeight()- Specified by:
getMinHeightin interfaceorg.bukkit.World
-
spawn
public <T extends org.bukkit.entity.Entity> T spawn(org.bukkit.Location location, Class<T> clazz) throws IllegalArgumentException - Specified by:
spawnin interfaceorg.bukkit.World- Throws:
IllegalArgumentException
-
spawn
public <T extends org.bukkit.entity.Entity> T spawn(org.bukkit.Location location, Class<T> clazz, org.bukkit.util.Consumer<T> function) throws IllegalArgumentException - Specified by:
spawnin interfaceorg.bukkit.World- Throws:
IllegalArgumentException
-
spawn
@NotNull public <T extends org.bukkit.entity.Entity> T spawn(org.bukkit.Location location, Class<T> clazz, org.bukkit.util.Consumer<T> function, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) throws IllegalArgumentException - Specified by:
spawnin interfaceorg.bukkit.World- Throws:
IllegalArgumentException
-
spawnGlowEntity
public <T extends GlowEntity,E extends org.bukkit.entity.Entity> GlowEntity spawnGlowEntity(org.bukkit.Location location, Class<T> clazz, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, @Nullable @Nullable org.bukkit.util.Consumer<E> function) throws IllegalArgumentException Spawns an entity.- Parameters:
location- theLocationto spawn the entity atclazz- the class of theEntityto spawnreason- the reason for the spawning of the entity- Returns:
- an instance of the spawned
Entity - Throws:
IllegalArgumentException- TODO: document the reason this can happen
-
spawnCustomEntity
public <T extends org.bukkit.entity.Entity> T spawnCustomEntity(org.bukkit.Location location, String id) throws IllegalArgumentException Spawn a custom entity at the givenLocation.- Type Parameters:
T- the class of theEntityto spawn- Parameters:
location- theLocationto spawn the entity atid- the id of the custom entity- Returns:
- an instance of the spawned
Entity - Throws:
IllegalArgumentException
-
spawnCustomEntity
public <T extends org.bukkit.entity.Entity> T spawnCustomEntity(org.bukkit.Location location, String id, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException Spawn a custom entity at the givenLocation, with the givenCreatureSpawnEvent.SpawnReason.- Type Parameters:
T- the class of theEntityto spawn- Parameters:
location- theLocationto spawn the entity atid- the id of the custom entityreason- the reason for the spawning of the entity- Returns:
- an instance of the spawned
Entity - Throws:
IllegalArgumentException
-
dropItem
Spawn an item at the givenLocationwithout shooting effect.- Specified by:
dropItemin interfaceorg.bukkit.World- Parameters:
location- theLocationto spawn the item atitem- theItemStackthe item should have
-
dropItem
@NotNull public @NotNull org.bukkit.entity.Item dropItem(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.inventory.ItemStack stack, @Nullable @Nullable org.bukkit.util.Consumer<org.bukkit.entity.Item> consumer) - Specified by:
dropItemin interfaceorg.bukkit.World
-
dropItemNaturally
public GlowItem dropItemNaturally(org.bukkit.Location location, org.bukkit.inventory.ItemStack item) Spawn an item at the givenLocationwith shooting effect.- Specified by:
dropItemNaturallyin interfaceorg.bukkit.World- Parameters:
location- theLocationto spawn the item atitem- theItemStackthe item should have
-
dropItemNaturally
@NotNull public @NotNull org.bukkit.entity.Item dropItemNaturally(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.inventory.ItemStack stack, @Nullable @Nullable org.bukkit.util.Consumer<org.bukkit.entity.Item> consumer) - Specified by:
dropItemNaturallyin interfaceorg.bukkit.World
-
spawnArrow
public org.bukkit.entity.Arrow spawnArrow(org.bukkit.Location location, org.bukkit.util.Vector velocity, float speed, float spread) - Specified by:
spawnArrowin interfaceorg.bukkit.World
-
spawnArrow
@NotNull public <T extends org.bukkit.entity.AbstractArrow> T spawnArrow(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.util.Vector vector, float speed, float spread, @NotNull @NotNull Class<T> clazz) - Specified by:
spawnArrowin interfaceorg.bukkit.World
-
spawnFallingBlock
public org.bukkit.entity.FallingBlock spawnFallingBlock(org.bukkit.Location location, org.bukkit.material.MaterialData data) throws IllegalArgumentException - Specified by:
spawnFallingBlockin interfaceorg.bukkit.World- Throws:
IllegalArgumentException
-
spawnFallingBlock
@Deprecated public org.bukkit.entity.FallingBlock spawnFallingBlock(org.bukkit.Location location, org.bukkit.Material material, byte data) throws IllegalArgumentException Deprecated.- Specified by:
spawnFallingBlockin interfaceorg.bukkit.World- Throws:
IllegalArgumentException
-
spawnFallingBlock
public org.bukkit.entity.FallingBlock spawnFallingBlock(org.bukkit.Location location, org.bukkit.block.data.BlockData blockData) throws IllegalArgumentException - Specified by:
spawnFallingBlockin interfaceorg.bukkit.World- Throws:
IllegalArgumentException
-
spawnEntity
public org.bukkit.entity.Entity spawnEntity(org.bukkit.Location loc, org.bukkit.entity.EntityType type) - Specified by:
spawnEntityin interfaceorg.bukkit.World
-
strikeLightning
- Specified by:
strikeLightningin interfaceorg.bukkit.World
-
strikeLightningEffect
- Specified by:
strikeLightningEffectin interfaceorg.bukkit.World
-
setTime
public void setTime(long time) - Specified by:
setTimein interfaceorg.bukkit.World
-
isDayTime
public boolean isDayTime()- Specified by:
isDayTimein interfaceorg.bukkit.World
-
getGameTime
public long getGameTime()- Specified by:
getGameTimein interfaceorg.bukkit.World
-
hasStorm
public boolean hasStorm()- Specified by:
hasStormin interfaceorg.bukkit.World
-
setStorm
public void setStorm(boolean hasStorm) - Specified by:
setStormin interfaceorg.bukkit.World
-
setThundering
public void setThundering(boolean thundering) - Specified by:
setThunderingin interfaceorg.bukkit.World
-
isClearWeather
public boolean isClearWeather()- Specified by:
isClearWeatherin interfaceorg.bukkit.World
-
setClearWeatherDuration
public void setClearWeatherDuration(int i) - Specified by:
setClearWeatherDurationin interfaceorg.bukkit.World
-
getClearWeatherDuration
public int getClearWeatherDuration()- Specified by:
getClearWeatherDurationin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(org.bukkit.Location loc, float power) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(org.bukkit.Location loc, float power, boolean setFire) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(org.bukkit.entity.Entity source, org.bukkit.Location loc, float power, boolean setFire, boolean breakBlocks) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(@NotNull @NotNull org.bukkit.Location location, float power, boolean setFire, boolean breakBlocks) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(@NotNull @NotNull org.bukkit.Location location, float power, boolean setFire, boolean breakBlocks, @Nullable @Nullable org.bukkit.entity.Entity source) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(double x, double y, double z, float power) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(double x, double y, double z, float power, boolean setFire) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, @Nullable @Nullable org.bukkit.entity.Entity source) - Specified by:
createExplosionin interfaceorg.bukkit.World
-
createExplosion
public boolean createExplosion(org.bukkit.entity.Entity source, double x, double y, double z, float power, boolean incendiary, boolean breakBlocks) Create an explosion with a specific entity as the source.- Parameters:
source- The entity to treat as the source, or null.x- X coordinatey- Y coordinatez- Z coordinatepower- The power of explosion, where 4F is TNTincendiary- Whether or not to set blocks on firebreakBlocks- Whether or not to have blocks be destroyed- Returns:
- false if explosion was canceled, otherwise true
-
playEffect
public void playEffect(org.bukkit.Location location, org.bukkit.Effect effect, int data) - Specified by:
playEffectin interfaceorg.bukkit.World
-
playEffect
public void playEffect(org.bukkit.Location location, org.bukkit.Effect effect, int data, int radius) - Specified by:
playEffectin interfaceorg.bukkit.World
-
playEffect
public <T> void playEffect(org.bukkit.Location location, org.bukkit.Effect effect, T data) - Specified by:
playEffectin interfaceorg.bukkit.World
-
playEffect
public <T> void playEffect(org.bukkit.Location location, org.bukkit.Effect effect, T data, int radius) - Specified by:
playEffectin interfaceorg.bukkit.World
-
playEffectExceptTo
public void playEffectExceptTo(org.bukkit.Location location, org.bukkit.Effect effect, int data, int radius, org.bukkit.entity.Player exclude) Plays an effect to all but one player within a given radius around a location.- Parameters:
location- theLocationaround which players must be to hear the effecteffect- theEffectdata- a data bit needed for some effectsradius- the radius around the locationexclude- the player who won't see the effect
-
playSound
public void playSound(org.bukkit.Location location, org.bukkit.Sound sound, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.World
-
playSound
- Specified by:
playSoundin interfaceorg.bukkit.World
-
playSound
public void playSound(org.bukkit.Location location, org.bukkit.Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.World
-
playSound
public void playSound(org.bukkit.Location location, String sound, org.bukkit.SoundCategory category, float volume, float pitch) - Specified by:
playSoundin interfaceorg.bukkit.World
-
spigot
public org.bukkit.World.Spigot spigot()- Specified by:
spigotin interfaceorg.bukkit.World
-
locateNearestRaid
@Nullable public @Nullable org.bukkit.Raid locateNearestRaid(@NotNull @NotNull org.bukkit.Location location, int radius) - Specified by:
locateNearestRaidin interfaceorg.bukkit.World
-
getRaids
- Specified by:
getRaidsin interfaceorg.bukkit.World
-
getEnderDragonBattle
@Nullable public @Nullable org.bukkit.boss.DragonBattle getEnderDragonBattle()- Specified by:
getEnderDragonBattlein interfaceorg.bukkit.World
-
showParticle
public void showParticle(org.bukkit.Location loc, org.bukkit.Effect particle, float offsetX, float offsetY, float offsetZ, float speed, int amount) Displays the given particle to all players.- Parameters:
loc- the locationparticle- the particle typeoffsetX- TODO: document this parameteroffsetY- TODO: document this parameteroffsetZ- TODO: document this parameterspeed- TODO: document this parameteramount- the number of particles
-
showParticle
public void showParticle(org.bukkit.Location loc, org.bukkit.Effect particle, int id, int data, float offsetX, float offsetY, float offsetZ, float speed, int amount, int radius) Displays the given particle to all players.- Parameters:
loc- the locationparticle- the particle typeid- the block or item type IDdata- the block or item dataoffsetX- TODO: document this parameteroffsetY- TODO: document this parameteroffsetZ- TODO: document this parameterspeed- TODO: document this parameteramount- the number of particlesradius- TODO: document this parameter
-
unload
public boolean unload()Unloads the world.- Returns:
- true if successful
-
getWorldFolder
Get the world folder.- Specified by:
getWorldFolderin interfaceorg.bukkit.World- Returns:
- world folder
-
getGameRules
- Specified by:
getGameRulesin interfaceorg.bukkit.World
-
getGameRuleValue
- Specified by:
getGameRuleValuein interfaceorg.bukkit.World
-
getGameRuleValue
public <T> T getGameRuleValue(org.bukkit.GameRule<T> gameRule) - Specified by:
getGameRuleValuein interfaceorg.bukkit.World
-
setGameRuleValue
- Specified by:
setGameRuleValuein interfaceorg.bukkit.World
-
isGameRule
- Specified by:
isGameRulein interfaceorg.bukkit.World
-
getGameRuleDefault
public <T> T getGameRuleDefault(org.bukkit.GameRule<T> gameRule) - Specified by:
getGameRuleDefaultin interfaceorg.bukkit.World
-
setGameRule
public <T> boolean setGameRule(org.bukkit.GameRule<T> gameRule, T t) - Specified by:
setGameRulein interfaceorg.bukkit.World
-
getFunctions
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, List<org.bukkit.entity.Player> receivers, org.bukkit.entity.Player source, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @Nullable @Nullable List<org.bukkit.entity.Player> list, @Nullable @Nullable org.bukkit.entity.Player player, double v, double v1, double v2, int i, double v3, double v4, double v5, double v6, @Nullable T t, boolean b) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, @NotNull @NotNull org.bukkit.Location location, int i, double v, double v1, double v2, double v3, @Nullable T t, boolean b) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull org.bukkit.Particle particle, double v, double v1, double v2, int i, double v3, double v4, double v5, double v6, @Nullable T t, boolean b) - Specified by:
spawnParticlein interfaceorg.bukkit.World
-
locateNearestStructure
@Nullable public @Nullable org.bukkit.Location locateNearestStructure(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.StructureType structureType, int i, boolean b) - Specified by:
locateNearestStructurein interfaceorg.bukkit.World
-
locateNearestBiome
@Nullable public @Nullable org.bukkit.Location locateNearestBiome(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.block.Biome biome, int i) - Specified by:
locateNearestBiomein interfaceorg.bukkit.World
-
locateNearestBiome
@Nullable public @Nullable org.bukkit.Location locateNearestBiome(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.block.Biome biome, int i, int i1) - Specified by:
locateNearestBiomein interfaceorg.bukkit.World
-
isUltrawarm
public boolean isUltrawarm()- Specified by:
isUltrawarmin interfaceorg.bukkit.World
-
isNatural
public boolean isNatural()- Specified by:
isNaturalin interfaceorg.bukkit.World
-
getCoordinateScale
public double getCoordinateScale()- Specified by:
getCoordinateScalein interfaceorg.bukkit.World
-
hasSkylight
public boolean hasSkylight()- Specified by:
hasSkylightin interfaceorg.bukkit.World
-
hasBedrockCeiling
public boolean hasBedrockCeiling()- Specified by:
hasBedrockCeilingin interfaceorg.bukkit.World
-
isPiglinSafe
public boolean isPiglinSafe()- Specified by:
isPiglinSafein interfaceorg.bukkit.World
-
doesBedWork
public boolean doesBedWork()- Specified by:
doesBedWorkin interfaceorg.bukkit.World
-
doesRespawnAnchorWork
public boolean doesRespawnAnchorWork()- Specified by:
doesRespawnAnchorWorkin interfaceorg.bukkit.World
-
hasRaids
public boolean hasRaids()- Specified by:
hasRaidsin interfaceorg.bukkit.World
-
isFixedTime
public boolean isFixedTime()- Specified by:
isFixedTimein interfaceorg.bukkit.World
-
getInfiniburn
- Specified by:
getInfiniburnin interfaceorg.bukkit.World
-
getNoTickViewDistance
public int getNoTickViewDistance()- Specified by:
getNoTickViewDistancein interfaceorg.bukkit.World
-
setNoTickViewDistance
public void setNoTickViewDistance(int viewDistance) - Specified by:
setNoTickViewDistancein interfaceorg.bukkit.World
-
setMetadata
- Specified by:
setMetadatain interfaceorg.bukkit.metadata.Metadatable
-
getMetadata
- Specified by:
getMetadatain interfaceorg.bukkit.metadata.Metadatable
-
hasMetadata
- Specified by:
hasMetadatain interfaceorg.bukkit.metadata.Metadatable
-
removeMetadata
- Specified by:
removeMetadatain interfaceorg.bukkit.metadata.Metadatable
-
sendPluginMessage
- Specified by:
sendPluginMessagein interfaceorg.bukkit.plugin.messaging.PluginMessageRecipient
-
getListeningPluginChannels
- Specified by:
getListeningPluginChannelsin interfaceorg.bukkit.plugin.messaging.PluginMessageRecipient
-
getTickMap
-
requestPulse
-
requestPulse
public void requestPulse(org.bukkit.Location location) -
cancelPulse
-
cancelPulse
public void cancelPulse(org.bukkit.Location location) -
hashCode
public int hashCode() -
equals
-
toString
-
getServer
Get the world's parent server.- Returns:
- The GlowServer for the world.
-
getName
The name of this world.- Specified by:
getNamein interfaceorg.bukkit.World
-
getChunkManager
The chunk manager.- Returns:
- The ChunkManager for the world.
-
getStorage
The storage provider for the world.- Returns:
- The
WorldStorageProvider.
-
getEntityManager
The entity manager.- Returns:
- the entity manager
-
getGameRuleMap
The game rules used in this world. -
getEnvironment
public org.bukkit.World.Environment getEnvironment()The environment.- Specified by:
getEnvironmentin interfaceorg.bukkit.World
-
getSeed
public long getSeed()The world seed.- Specified by:
getSeedin interfaceorg.bukkit.World
-
getSeedHash
public byte[] getSeedHash()The SHA-256 hash of the world seed. -
getWorldBorder
The world border.- Specified by:
getWorldBorderin interfaceorg.bukkit.World
-
getWorldType
public org.bukkit.WorldType getWorldType()The world type.- Specified by:
getWorldTypein interfaceorg.bukkit.World
-
setWorldType
public void setWorldType(org.bukkit.WorldType worldType) The world type. -
getWeatherDuration
public int getWeatherDuration()How many ticks until the rain/snow status is expected to change.- Specified by:
getWeatherDurationin interfaceorg.bukkit.World
-
setWeatherDuration
public void setWeatherDuration(int weatherDuration) How many ticks until the rain/snow status is expected to change.- Specified by:
setWeatherDurationin interfaceorg.bukkit.World
-
isThundering
public boolean isThundering()Whether it is currently thundering on this world.- Specified by:
isThunderingin interfaceorg.bukkit.World
-
getThunderDuration
public int getThunderDuration()How many ticks until the thundering status is expected to change.- Specified by:
getThunderDurationin interfaceorg.bukkit.World
-
setThunderDuration
public void setThunderDuration(int thunderDuration) How many ticks until the thundering status is expected to change.- Specified by:
setThunderDurationin interfaceorg.bukkit.World
-
getRainDensity
public float getRainDensity()The rain density on the current world tick. -
getSkyDarkness
public float getSkyDarkness()The sky darkness on the current world tick. -
getFullTime
public long getFullTime()The age of the world, in ticks.- Specified by:
getFullTimein interfaceorg.bukkit.World
-
setFullTime
public void setFullTime(long fullTime) The age of the world, in ticks.- Specified by:
setFullTimein interfaceorg.bukkit.World
-
getTime
public long getTime()The current world time.- Specified by:
getTimein interfaceorg.bukkit.World
-
isAutoSave
public boolean isAutoSave()The check to autosave.- Specified by:
isAutoSavein interfaceorg.bukkit.World
-
setAutoSave
public void setAutoSave(boolean autoSave) The check to autosave.- Specified by:
setAutoSavein interfaceorg.bukkit.World
-
getDifficulty
public org.bukkit.Difficulty getDifficulty()The world's gameplay difficulty.- Specified by:
getDifficultyin interfaceorg.bukkit.World
-
setTicksPerAnimalSpawns
public void setTicksPerAnimalSpawns(int ticksPerAnimalSpawns) Ticks between when passive mobs are spawned.- Specified by:
setTicksPerAnimalSpawnsin interfaceorg.bukkit.World
-
setTicksPerMonsterSpawns
public void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns) Ticks between when hostile mobs are spawned.- Specified by:
setTicksPerMonsterSpawnsin interfaceorg.bukkit.World
-
setTicksPerWaterSpawns
public void setTicksPerWaterSpawns(int ticksPerWaterSpawns) Ticks between when water mobs are spawned.- Specified by:
setTicksPerWaterSpawnsin interfaceorg.bukkit.World
-
setTicksPerWaterAmbientSpawns
public void setTicksPerWaterAmbientSpawns(int ticksPerWaterAmbientSpawns) Ticks between when ambient water mobs are spawned.- Specified by:
setTicksPerWaterAmbientSpawnsin interfaceorg.bukkit.World
-
setTicksPerAmbientSpawns
public void setTicksPerAmbientSpawns(int ticksPerAmbientSpawns) Ticks between when ambient mobs are spawned.- Specified by:
setTicksPerAmbientSpawnsin interfaceorg.bukkit.World
-
getMonsterSpawnLimit
public int getMonsterSpawnLimit()Per-world spawn limits on hostile mobs.- Specified by:
getMonsterSpawnLimitin interfaceorg.bukkit.World
-
setMonsterSpawnLimit
public void setMonsterSpawnLimit(int monsterSpawnLimit) Per-world spawn limits on hostile mobs.- Specified by:
setMonsterSpawnLimitin interfaceorg.bukkit.World
-
getAnimalSpawnLimit
public int getAnimalSpawnLimit()Per-world spawn limits on passive mobs.- Specified by:
getAnimalSpawnLimitin interfaceorg.bukkit.World
-
setAnimalSpawnLimit
public void setAnimalSpawnLimit(int animalSpawnLimit) Per-world spawn limits on passive mobs.- Specified by:
setAnimalSpawnLimitin interfaceorg.bukkit.World
-
getWaterAnimalSpawnLimit
public int getWaterAnimalSpawnLimit()Per-world spawn limits on water mobs.- Specified by:
getWaterAnimalSpawnLimitin interfaceorg.bukkit.World
-
setWaterAnimalSpawnLimit
public void setWaterAnimalSpawnLimit(int waterAnimalSpawnLimit) Per-world spawn limits on water mobs.- Specified by:
setWaterAnimalSpawnLimitin interfaceorg.bukkit.World
-
getWaterAmbientSpawnLimit
public int getWaterAmbientSpawnLimit()Per-world spawn limits on water ambient mobs.- Specified by:
getWaterAmbientSpawnLimitin interfaceorg.bukkit.World
-
setWaterAmbientSpawnLimit
public void setWaterAmbientSpawnLimit(int waterAmbientSpawnLimit) Per-world spawn limits on water ambient mobs.- Specified by:
setWaterAmbientSpawnLimitin interfaceorg.bukkit.World
-
getAmbientSpawnLimit
public int getAmbientSpawnLimit()Per-world spawn limits on ambient mobs (bats).- Specified by:
getAmbientSpawnLimitin interfaceorg.bukkit.World
-
setAmbientSpawnLimit
public void setAmbientSpawnLimit(int ambientSpawnLimit) Per-world spawn limits on ambient mobs (bats).- Specified by:
setAmbientSpawnLimitin interfaceorg.bukkit.World
-
getMaxHeight
public int getMaxHeight()The maximum height at which players may place blocks.- Specified by:
getMaxHeightin interfaceorg.bukkit.World
-
isInitialized
public boolean isInitialized()Whether the world has been initialized (i.e. loading/spawn generation is completed). -
getViewDistance
public int getViewDistance()Per-world view distance.- Specified by:
getViewDistancein interfaceorg.bukkit.World
-
setViewDistance
public void setViewDistance(int viewDistance) Per-world view distance.- Specified by:
setViewDistancein interfaceorg.bukkit.World
-
isHardcore
public boolean isHardcore()Per-world hardcore setting.- Specified by:
isHardcorein interfaceorg.bukkit.World
-
setHardcore
public void setHardcore(boolean hardcore) Per-world hardcore setting.- Specified by:
setHardcorein interfaceorg.bukkit.World
-