![]() |
Bukkit
1.4.7-R1.0
|
Represents a world, which may contain entities, chunks and blocks. More...
Inheritance diagram for org.bukkit.World:
Collaboration diagram for org.bukkit.World:Classes | |
| enum | Environment |
| Represents various map environment types that a world may be. More... | |
Public Member Functions | |
| Block | getBlockAt (int x, int y, int z) |
| Gets the Block at the given coordinates. | |
| Block | getBlockAt (Location location) |
| Gets the Block at the given Location. | |
| int | getBlockTypeIdAt (int x, int y, int z) |
| Gets the block type ID at the given coordinates. | |
| int | getBlockTypeIdAt (Location location) |
| Gets the block type ID at the given Location. | |
| int | getHighestBlockYAt (int x, int z) |
| Gets the highest non-air coordinate at the given coordinates. | |
| int | getHighestBlockYAt (Location location) |
| Gets the highest non-air coordinate at the given Location. | |
| Block | getHighestBlockAt (int x, int z) |
| Gets the highest non-empty block at the given coordinates. | |
| Block | getHighestBlockAt (Location location) |
| Gets the highest non-empty block at the given coordinates. | |
| Chunk | getChunkAt (int x, int z) |
| Gets the Chunk at the given coordinates. | |
| Chunk | getChunkAt (Location location) |
| Gets the Chunk at the given Location. | |
| Chunk | getChunkAt (Block block) |
| Gets the Chunk that contains the given Block. | |
| boolean | isChunkLoaded (Chunk chunk) |
| Checks if the specified Chunk is loaded. | |
| Chunk[] | getLoadedChunks () |
| Gets an array of all loaded Chunks. | |
| void | loadChunk (Chunk chunk) |
| Loads the specified Chunk. | |
| boolean | isChunkLoaded (int x, int z) |
| Checks if the Chunk at the specified coordinates is loaded. | |
| boolean | isChunkInUse (int x, int z) |
| Checks if the Chunk at the specified coordinates is loaded and in use by one or more players. | |
| void | loadChunk (int x, int z) |
| Loads the Chunk at the specified coordinates. | |
| boolean | loadChunk (int x, int z, boolean generate) |
| Loads the Chunk at the specified coordinates. | |
| boolean | unloadChunk (Chunk chunk) |
| Safely unloads and saves the Chunk at the specified coordinates. | |
| boolean | unloadChunk (int x, int z) |
| Safely unloads and saves the Chunk at the specified coordinates. | |
| boolean | unloadChunk (int x, int z, boolean save) |
| Safely unloads and optionally saves the Chunk at the specified coordinates. | |
| boolean | unloadChunk (int x, int z, boolean save, boolean safe) |
| Unloads and optionally saves the Chunk at the specified coordinates. | |
| boolean | unloadChunkRequest (int x, int z) |
| Safely queues the Chunk at the specified coordinates for unloading. | |
| boolean | unloadChunkRequest (int x, int z, boolean safe) |
| Queues the Chunk at the specified coordinates for unloading. | |
| boolean | regenerateChunk (int x, int z) |
| Regenerates the Chunk at the specified coordinates. | |
| boolean | refreshChunk (int x, int z) |
| Resends the Chunk to all clients. | |
| Item | dropItem (Location location, ItemStack item) |
| Drops an item at the specified Location. | |
| Item | dropItemNaturally (Location location, ItemStack item) |
| Drops an item at the specified Location with a random offset. | |
| Arrow | spawnArrow (Location location, Vector velocity, float speed, float spread) |
| Creates an Arrow entity at the given Location. | |
| boolean | generateTree (Location location, TreeType type) |
| Creates a tree at the given Location. | |
| boolean | generateTree (Location loc, TreeType type, BlockChangeDelegate delegate) |
| Creates a tree at the given Location. | |
| Entity | spawnEntity (Location loc, EntityType type) |
| Creates a entity at the given Location. | |
| LivingEntity | spawnCreature (Location loc, EntityType type) |
| Creates a creature at the given Location. | |
| LivingEntity | spawnCreature (Location loc, CreatureType type) |
| Creates a creature at the given Location. | |
| LightningStrike | strikeLightning (Location loc) |
| Strikes lightning at the given Location. | |
| LightningStrike | strikeLightningEffect (Location loc) |
| Strikes lightning at the given Location without doing damage. | |
| List< Entity > | getEntities () |
| Get a list of all entities in this World. | |
| List< LivingEntity > | getLivingEntities () |
| Get a list of all living entities in this World. | |
| public< T extends Entity > Collection< T > | getEntitiesByClass (Class< T >...classes) |
| Get a collection of all entities in this World matching the given class/interface. | |
| public< T extends Entity > Collection< T > | getEntitiesByClass (Class< T > cls) |
| Get a collection of all entities in this World matching the given class/interface. | |
| Collection< Entity > | getEntitiesByClasses (Class<?>...classes) |
| Get a collection of all entities in this World matching any of the given classes/interfaces. | |
| List< Player > | getPlayers () |
| Get a list of all players in this World. | |
| String | getName () |
| Gets the unique name of this world. | |
| UUID | getUID () |
| Gets the Unique ID of this world. | |
| Location | getSpawnLocation () |
| Gets the default spawn Location of this world. | |
| boolean | setSpawnLocation (int x, int y, int z) |
| Sets the spawn location of the world. | |
| long | getTime () |
| Gets the relative in-game time of this world. | |
| void | setTime (long time) |
| Sets the relative in-game time on the server. | |
| long | getFullTime () |
| Gets the full in-game time on this world. | |
| void | setFullTime (long time) |
| Sets the in-game time on the server. | |
| boolean | hasStorm () |
| Returns whether the world has an ongoing storm. | |
| void | setStorm (boolean hasStorm) |
| Set whether there is a storm. | |
| int | getWeatherDuration () |
| Get the remaining time in ticks of the current conditions. | |
| void | setWeatherDuration (int duration) |
| Set the remaining time in ticks of the current conditions. | |
| boolean | isThundering () |
| Returns whether there is thunder. | |
| void | setThundering (boolean thundering) |
| Set whether it is thundering. | |
| int | getThunderDuration () |
| Get the thundering duration. | |
| void | setThunderDuration (int duration) |
| Set the thundering duration. | |
| boolean | createExplosion (double x, double y, double z, float power) |
| Creates explosion at given coordinates with given power. | |
| boolean | createExplosion (double x, double y, double z, float power, boolean setFire) |
| Creates explosion at given coordinates with given power and optionally setting blocks on fire. | |
| boolean | createExplosion (double x, double y, double z, float power, boolean setFire, boolean breakBlocks) |
| Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks. | |
| boolean | createExplosion (Location loc, float power) |
| Creates explosion at given coordinates with given power. | |
| boolean | createExplosion (Location loc, float power, boolean setFire) |
| Creates explosion at given coordinates with given power and optionally setting blocks on fire. | |
| Environment | getEnvironment () |
| Gets the Environment type of this world. | |
| long | getSeed () |
| Gets the Seed for this world. | |
| boolean | getPVP () |
| Gets the current PVP setting for this world. | |
| void | setPVP (boolean pvp) |
| Sets the PVP setting for this world. | |
| ChunkGenerator | getGenerator () |
| Gets the chunk generator for this world. | |
| void | save () |
| Saves world to disk. | |
| List< BlockPopulator > | getPopulators () |
| Gets a list of all applied BlockPopulators for this World. | |
| public< T extends Entity > T | spawn (Location location, Class< T > clazz) throws IllegalArgumentException |
| Spawn an entity of a specific class at the given Location. | |
| FallingBlock | spawnFallingBlock (Location location, Material material, byte data) throws IllegalArgumentException |
| Spawn a FallingBlock entity at the given Location of the specified Material. | |
| FallingBlock | spawnFallingBlock (Location location, int blockId, byte blockData) throws IllegalArgumentException |
| Spawn a FallingBlock entity at the given Location of the specified blockId (converted to Material) | |
| void | playEffect (Location location, Effect effect, int data) |
| Plays an effect to all players within a default radius around a given location. | |
| void | playEffect (Location location, Effect effect, int data, int radius) |
| Plays an effect to all players within a given radius around a location. | |
| public< T > void | playEffect (Location location, Effect effect, T data) |
| Plays an effect to all players within a default radius around a given location. | |
| public< T > void | playEffect (Location location, Effect effect, T data, int radius) |
| Plays an effect to all players within a given radius around a location. | |
| ChunkSnapshot | getEmptyChunkSnapshot (int x, int z, boolean includeBiome, boolean includeBiomeTempRain) |
| Get empty chunk snapshot (equivalent to all air blocks), optionally including valid biome data. | |
| void | setSpawnFlags (boolean allowMonsters, boolean allowAnimals) |
| Sets the spawn flags for this. | |
| boolean | getAllowAnimals () |
| Gets whether animals can spawn in this world. | |
| boolean | getAllowMonsters () |
| Gets whether monsters can spawn in this world. | |
| Biome | getBiome (int x, int z) |
| Gets the biome for the given block coordinates. | |
| void | setBiome (int x, int z, Biome bio) |
| Sets the biome for the given block coordinates. | |
| double | getTemperature (int x, int z) |
| Gets the temperature for the given block coordinates. | |
| double | getHumidity (int x, int z) |
| Gets the humidity for the given block coordinates. | |
| int | getMaxHeight () |
| Gets the maximum height of this world. | |
| int | getSeaLevel () |
| Gets the sea level for this world. | |
| boolean | getKeepSpawnInMemory () |
| Gets whether the world's spawn area should be kept loaded into memory or not. | |
| void | setKeepSpawnInMemory (boolean keepLoaded) |
| Sets whether the world's spawn area should be kept loaded into memory or not. | |
| boolean | isAutoSave () |
| Gets whether or not the world will automatically save. | |
| void | setAutoSave (boolean value) |
| Sets whether or not the world will automatically save. | |
| void | setDifficulty (Difficulty difficulty) |
| Sets the Difficulty of the world. | |
| Difficulty | getDifficulty () |
| Gets the Difficulty of the world. | |
| File | getWorldFolder () |
| Gets the folder of this world on disk. | |
| WorldType | getWorldType () |
| Gets the type of this world. | |
| boolean | canGenerateStructures () |
| Gets whether or not structures are being generated. | |
| long | getTicksPerAnimalSpawns () |
| Gets the world's ticks per animal spawns value. | |
| void | setTicksPerAnimalSpawns (int ticksPerAnimalSpawns) |
| Sets the world's ticks per animal spawns value. | |
| long | getTicksPerMonsterSpawns () |
| Gets the world's ticks per monster spawns value. | |
| void | setTicksPerMonsterSpawns (int ticksPerMonsterSpawns) |
| Sets the world's ticks per monster spawns value. | |
| int | getMonsterSpawnLimit () |
| Gets limit for number of monsters that can spawn in a chunk in this world. | |
| void | setMonsterSpawnLimit (int limit) |
| Sets the limit for number of monsters that can spawn in a chunk in this world. | |
| int | getAnimalSpawnLimit () |
| Gets the limit for number of animals that can spawn in a chunk in this world. | |
| void | setAnimalSpawnLimit (int limit) |
| Sets the limit for number of animals that can spawn in a chunk in this world. | |
| int | getWaterAnimalSpawnLimit () |
| Gets the limit for number of water animals that can spawn in a chunk in this world. | |
| void | setWaterAnimalSpawnLimit (int limit) |
| Sets the limit for number of water animals that can spawn in a chunk in this world. | |
| int | getAmbientSpawnLimit () |
| Gets the limit for number of ambient mobs that can spawn in a chunk in this world. | |
| void | setAmbientSpawnLimit (int limit) |
| Sets the limit for number of ambient mobs that can spawn in a chunk in this world. | |
| void | playSound (Location loc, Sound sound, float volume, float pitch) |
| Play a Sound at the provided Location in the World. | |
| String[] | getGameRules () |
| Get existing rules. | |
| String | getGameRuleValue (String rule) |
| Gets the current state of the specified rule. | |
| boolean | setGameRuleValue (String rule, String value) |
| Set the specified gamerule to specified value. | |
| boolean | isGameRule (String rule) |
| Checks if string is a valid game rule. | |
Public Member Functions inherited from org.bukkit.plugin.messaging.PluginMessageRecipient | |
| void | sendPluginMessage (Plugin source, String channel, byte[] message) |
| Sends this recipient a Plugin Message on the specified outgoing channel. | |
| Set< String > | getListeningPluginChannels () |
| Gets a set containing all the Plugin Channels that this client is listening on. | |
Public Member Functions inherited from org.bukkit.metadata.Metadatable | |
| void | setMetadata (String metadataKey, MetadataValue newMetadataValue) |
| Sets a metadata value in the implementing object's metadata store. | |
| List< MetadataValue > | getMetadata (String metadataKey) |
| Returns a list of previously set metadata values from the implementing object's metadata store. | |
| boolean | hasMetadata (String metadataKey) |
| Tests to see whether the implementing object contains the given metadata value in its metadata store. | |
| void | removeMetadata (String metadataKey, Plugin owningPlugin) |
| Removes the given metadata value from the implementing object's metadata store. | |
Represents a world, which may contain entities, chunks and blocks.
Definition at line 23 of file World.java.
| boolean org.bukkit.World.canGenerateStructures | ( | ) |
Gets whether or not structures are being generated.
| boolean org.bukkit.World.createExplosion | ( | double | x, |
| double | y, | ||
| double | z, | ||
| float | power | ||
| ) |
Creates explosion at given coordinates with given power.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| power | The power of explosion, where 4F is TNT |
| boolean org.bukkit.World.createExplosion | ( | double | x, |
| double | y, | ||
| double | z, | ||
| float | power, | ||
| boolean | setFire | ||
| ) |
Creates explosion at given coordinates with given power and optionally setting blocks on fire.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| power | The power of explosion, where 4F is TNT |
| setFire | Whether or not to set blocks on fire |
| boolean org.bukkit.World.createExplosion | ( | double | x, |
| double | y, | ||
| double | z, | ||
| float | power, | ||
| boolean | setFire, | ||
| boolean | breakBlocks | ||
| ) |
Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| power | The power of explosion, where 4F is TNT |
| setFire | Whether or not to set blocks on fire |
| breakBlocks | Whether or not to have blocks be destroyed |
| boolean org.bukkit.World.createExplosion | ( | Location | loc, |
| float | power | ||
| ) |
Creates explosion at given coordinates with given power.
| loc | Location to blow up |
| power | The power of explosion, where 4F is TNT |
| boolean org.bukkit.World.createExplosion | ( | Location | loc, |
| float | power, | ||
| boolean | setFire | ||
| ) |
Creates explosion at given coordinates with given power and optionally setting blocks on fire.
| loc | Location to blow up |
| power | The power of explosion, where 4F is TNT |
| setFire | Whether or not to set blocks on fire |
Drops an item at the specified Location with a random offset.
| location | Location to drop the item |
| item | ItemStack to drop |
Referenced by org.bukkit.inventory.InventoryView.setItem().
| boolean org.bukkit.World.generateTree | ( | Location | loc, |
| TreeType | type, | ||
| BlockChangeDelegate | delegate | ||
| ) |
| boolean org.bukkit.World.getAllowAnimals | ( | ) |
Gets whether animals can spawn in this world.
| boolean org.bukkit.World.getAllowMonsters | ( | ) |
Gets whether monsters can spawn in this world.
| int org.bukkit.World.getAmbientSpawnLimit | ( | ) |
Gets the limit for number of ambient mobs that can spawn in a chunk in this world.
| int org.bukkit.World.getAnimalSpawnLimit | ( | ) |
Gets the limit for number of animals that can spawn in a chunk in this world.
| Biome org.bukkit.World.getBiome | ( | int | x, |
| int | z | ||
| ) |
Gets the biome for the given block coordinates.
| x | X coordinate of the block |
| z | Z coordinate of the block |
| Block org.bukkit.World.getBlockAt | ( | int | x, |
| int | y, | ||
| int | z | ||
| ) |
Gets the Block at the given coordinates.
| x | X-coordinate of the block |
| y | Y-coordinate of the block |
| z | Z-coordinate of the block |
Referenced by org.bukkit.util.BlockIterator.BlockIterator(), org.bukkit.generator.ChunkGenerator.canSpawn(), and org.bukkit.Location.getBlock().
Gets the Block at the given Location.
| location | Location of the block |
| int org.bukkit.World.getBlockTypeIdAt | ( | int | x, |
| int | y, | ||
| int | z | ||
| ) |
Gets the block type ID at the given coordinates.
| x | X-coordinate of the block |
| y | Y-coordinate of the block |
| z | Z-coordinate of the block |
| int org.bukkit.World.getBlockTypeIdAt | ( | Location | location | ) |
Gets the block type ID at the given Location.
| location | Location of the block |
| Chunk org.bukkit.World.getChunkAt | ( | int | x, |
| int | z | ||
| ) |
Gets the Chunk at the given coordinates.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
Referenced by org.bukkit.Location.getChunk().
| Difficulty org.bukkit.World.getDifficulty | ( | ) |
Gets the Difficulty of the world.
| ChunkSnapshot org.bukkit.World.getEmptyChunkSnapshot | ( | int | x, |
| int | z, | ||
| boolean | includeBiome, | ||
| boolean | includeBiomeTempRain | ||
| ) |
Get empty chunk snapshot (equivalent to all air blocks), optionally including valid biome data.
Used for representing an ungenerated chunk, or for fetching only biome data without loading a chunk.
| x | - chunk x coordinate |
| z | - chunk z coordinate |
| includeBiome | - if true, snapshot includes per-coordinate biome type |
| includeBiomeTempRain | - if true, snapshot includes per-coordinate raw biome temperature and rainfall |
| List<Entity> org.bukkit.World.getEntities | ( | ) |
Get a list of all entities in this World.
| public<T extends Entity> Collection<T> org.bukkit.World.getEntitiesByClass | ( | Class< T >... | classes | ) |
Get a collection of all entities in this World matching the given class/interface.
| classes | The classes representing the types of entity to match |
| public<T extends Entity> Collection<T> org.bukkit.World.getEntitiesByClass | ( | Class< T > | cls | ) |
Get a collection of all entities in this World matching the given class/interface.
| cls | The class representing the type of entity to match |
| Collection<Entity> org.bukkit.World.getEntitiesByClasses | ( | Class<?>... | classes | ) |
Get a collection of all entities in this World matching any of the given classes/interfaces.
| classes | The classes representing the types of entity to match |
| Environment org.bukkit.World.getEnvironment | ( | ) |
Gets the Environment type of this world.
Referenced by org.bukkit.generator.ChunkGenerator.canSpawn(), and org.bukkit.WorldCreator.copy().
| long org.bukkit.World.getFullTime | ( | ) |
Gets the full in-game time on this world.
| String [] org.bukkit.World.getGameRules | ( | ) |
Get existing rules.
| String org.bukkit.World.getGameRuleValue | ( | String | rule | ) |
Gets the current state of the specified rule.
Will return null if rule passed is null
| rule | Rule to look up value of |
Referenced by org.bukkit.command.defaults.GameRuleCommand.execute().
| ChunkGenerator org.bukkit.World.getGenerator | ( | ) |
Gets the chunk generator for this world.
Referenced by org.bukkit.WorldCreator.copy().
| Block org.bukkit.World.getHighestBlockAt | ( | int | x, |
| int | z | ||
| ) |
Gets the highest non-empty block at the given coordinates.
| x | X-coordinate of the block |
| z | Z-coordinate of the block |
Gets the highest non-empty block at the given coordinates.
| location | Coordinates to get the highest block |
| int org.bukkit.World.getHighestBlockYAt | ( | int | x, |
| int | z | ||
| ) |
Gets the highest non-air coordinate at the given coordinates.
| x | X-coordinate of the blocks |
| z | Z-coordinate of the blocks |
Referenced by org.bukkit.generator.ChunkGenerator.canSpawn().
| int org.bukkit.World.getHighestBlockYAt | ( | Location | location | ) |
| double org.bukkit.World.getHumidity | ( | int | x, |
| int | z | ||
| ) |
Gets the humidity for the given block coordinates.
It is safe to run this method when the block does not exist, it will not create the block.
| x | X coordinate of the block |
| z | Z coordinate of the block |
| boolean org.bukkit.World.getKeepSpawnInMemory | ( | ) |
Gets whether the world's spawn area should be kept loaded into memory or not.
| List<LivingEntity> org.bukkit.World.getLivingEntities | ( | ) |
Get a list of all living entities in this World.
| Chunk [] org.bukkit.World.getLoadedChunks | ( | ) |
| int org.bukkit.World.getMaxHeight | ( | ) |
Gets the maximum height of this world.
If the max height is 100, there are only blocks from y=0 to y=99.
Referenced by org.bukkit.command.defaults.SpawnpointCommand.execute().
| int org.bukkit.World.getMonsterSpawnLimit | ( | ) |
Gets limit for number of monsters that can spawn in a chunk in this world.
| String org.bukkit.World.getName | ( | ) |
Gets the unique name of this world.
Referenced by org.bukkit.Location.distanceSquared(), and org.bukkit.command.defaults.ToggleDownfallCommand.execute().
| List<Player> org.bukkit.World.getPlayers | ( | ) |
Get a list of all players in this World.
| List<BlockPopulator> org.bukkit.World.getPopulators | ( | ) |
Gets a list of all applied BlockPopulators for this World.
| boolean org.bukkit.World.getPVP | ( | ) |
Gets the current PVP setting for this world.
| int org.bukkit.World.getSeaLevel | ( | ) |
| long org.bukkit.World.getSeed | ( | ) |
Gets the Seed for this world.
Referenced by org.bukkit.WorldCreator.copy(), org.bukkit.util.noise.PerlinNoiseGenerator.PerlinNoiseGenerator(), org.bukkit.util.noise.PerlinOctaveGenerator.PerlinOctaveGenerator(), org.bukkit.util.noise.SimplexNoiseGenerator.SimplexNoiseGenerator(), and org.bukkit.util.noise.SimplexOctaveGenerator.SimplexOctaveGenerator().
| Location org.bukkit.World.getSpawnLocation | ( | ) |
Gets the default spawn Location of this world.
| double org.bukkit.World.getTemperature | ( | int | x, |
| int | z | ||
| ) |
Gets the temperature for the given block coordinates.
It is safe to run this method when the block does not exist, it will not create the block.
| x | X coordinate of the block |
| z | Z coordinate of the block |
| int org.bukkit.World.getThunderDuration | ( | ) |
Get the thundering duration.
| long org.bukkit.World.getTicksPerAnimalSpawns | ( | ) |
Gets the world's ticks per animal spawns value.
This value determines how many ticks there are between attempts to spawn animals.
Example Usage:
Note: If set to 0, animal spawning will be disabled for this world. We recommend using setSpawnFlags(boolean, boolean) to control this instead.
Minecraft default: 400.
| long org.bukkit.World.getTicksPerMonsterSpawns | ( | ) |
Gets the world's ticks per monster spawns value.
This value determines how many ticks there are between attempts to spawn monsters.
Example Usage:
Note: If set to 0, monsters spawning will be disabled for this world. We recommend using setSpawnFlags(boolean, boolean) to control this instead.
Minecraft default: 1.
| long org.bukkit.World.getTime | ( | ) |
Gets the relative in-game time of this world.
The relative time is analogous to hours * 1000
| UUID org.bukkit.World.getUID | ( | ) |
Gets the Unique ID of this world.
| int org.bukkit.World.getWaterAnimalSpawnLimit | ( | ) |
Gets the limit for number of water animals that can spawn in a chunk in this world.
| int org.bukkit.World.getWeatherDuration | ( | ) |
Get the remaining time in ticks of the current conditions.
| File org.bukkit.World.getWorldFolder | ( | ) |
Gets the folder of this world on disk.
| WorldType org.bukkit.World.getWorldType | ( | ) |
Gets the type of this world.
| boolean org.bukkit.World.hasStorm | ( | ) |
Returns whether the world has an ongoing storm.
Referenced by org.bukkit.command.defaults.ToggleDownfallCommand.execute().
| boolean org.bukkit.World.isAutoSave | ( | ) |
Gets whether or not the world will automatically save.
| boolean org.bukkit.World.isChunkInUse | ( | int | x, |
| int | z | ||
| ) |
Checks if the Chunk at the specified coordinates is loaded and in use by one or more players.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| boolean org.bukkit.World.isChunkLoaded | ( | Chunk | chunk | ) |
Checks if the specified Chunk is loaded.
| chunk | The chunk to check |
| boolean org.bukkit.World.isChunkLoaded | ( | int | x, |
| int | z | ||
| ) |
Checks if the Chunk at the specified coordinates is loaded.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| boolean org.bukkit.World.isGameRule | ( | String | rule | ) |
Checks if string is a valid game rule.
| rule | Rule to check |
Referenced by org.bukkit.command.defaults.GameRuleCommand.execute().
| boolean org.bukkit.World.isThundering | ( | ) |
Returns whether there is thunder.
| void org.bukkit.World.loadChunk | ( | Chunk | chunk | ) |
Loads the specified Chunk.
| chunk | The chunk to load |
| void org.bukkit.World.loadChunk | ( | int | x, |
| int | z | ||
| ) |
Loads the Chunk at the specified coordinates.
If the chunk does not exist, it will be generated. This method is analogous to loadChunk(int, int, boolean) where generate is true.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| boolean org.bukkit.World.loadChunk | ( | int | x, |
| int | z, | ||
| boolean | generate | ||
| ) |
Loads the Chunk at the specified coordinates.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| generate | Whether or not to generate a chunk if it doesn't already exist |
| boolean org.bukkit.World.refreshChunk | ( | int | x, |
| int | z | ||
| ) |
Resends the Chunk to all clients.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| boolean org.bukkit.World.regenerateChunk | ( | int | x, |
| int | z | ||
| ) |
Regenerates the Chunk at the specified coordinates.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| void org.bukkit.World.save | ( | ) |
Saves world to disk.
| void org.bukkit.World.setAmbientSpawnLimit | ( | int | limit | ) |
Sets the limit for number of ambient mobs that can spawn in a chunk in this world.
Note: If set to a negative number the world will use the server-wide spawn limit instead.
| void org.bukkit.World.setAnimalSpawnLimit | ( | int | limit | ) |
Sets the limit for number of animals that can spawn in a chunk in this world.
Note: If set to a negative number the world will use the server-wide spawn limit instead.
| void org.bukkit.World.setAutoSave | ( | boolean | value | ) |
Sets whether or not the world will automatically save.
| value | true if the world should automatically save, otherwise false |
| void org.bukkit.World.setBiome | ( | int | x, |
| int | z, | ||
| Biome | bio | ||
| ) |
Sets the biome for the given block coordinates.
| x | X coordinate of the block |
| z | Z coordinate of the block |
| bio | new Biome type for this block |
| void org.bukkit.World.setDifficulty | ( | Difficulty | difficulty | ) |
Sets the Difficulty of the world.
| difficulty | the new difficulty you want to set the world to |
| void org.bukkit.World.setFullTime | ( | long | time | ) |
Sets the in-game time on the server.
Note that this sets the full time of the world, which may cause adverse effects such as breaking redstone clocks and any scheduled events
| time | The new absolute time to set this world to |
| boolean org.bukkit.World.setGameRuleValue | ( | String | rule, |
| String | value | ||
| ) |
Set the specified gamerule to specified value.
The rule may attempt to validate the value passed, will return true if value was set.
If rule is null, the function will return false.
| rule | Rule to set |
| value | Value to set rule to |
Referenced by org.bukkit.command.defaults.GameRuleCommand.execute().
| void org.bukkit.World.setKeepSpawnInMemory | ( | boolean | keepLoaded | ) |
Sets whether the world's spawn area should be kept loaded into memory or not.
| keepLoaded | if true then the world's spawn area will be kept loaded into memory. |
| void org.bukkit.World.setMonsterSpawnLimit | ( | int | limit | ) |
Sets the limit for number of monsters that can spawn in a chunk in this world.
Note: If set to a negative number the world will use the server-wide spawn limit instead.
| void org.bukkit.World.setPVP | ( | boolean | pvp | ) |
Sets the PVP setting for this world.
| pvp | True/False whether PVP should be Enabled. |
| void org.bukkit.World.setSpawnFlags | ( | boolean | allowMonsters, |
| boolean | allowAnimals | ||
| ) |
Sets the spawn flags for this.
| allowMonsters | - if true, monsters are allowed to spawn in this world. |
| allowAnimals | - if true, animals are allowed to spawn in this world. |
| boolean org.bukkit.World.setSpawnLocation | ( | int | x, |
| int | y, | ||
| int | z | ||
| ) |
Sets the spawn location of the world.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| void org.bukkit.World.setStorm | ( | boolean | hasStorm | ) |
Set whether there is a storm.
A duration will be set for the new current conditions.
| hasStorm | Whether there is rain and snow |
Referenced by org.bukkit.command.defaults.ToggleDownfallCommand.execute(), and org.bukkit.command.defaults.WeatherCommand.execute().
| void org.bukkit.World.setThunderDuration | ( | int | duration | ) |
Set the thundering duration.
| duration | Duration in ticks |
Referenced by org.bukkit.command.defaults.WeatherCommand.execute().
| void org.bukkit.World.setThundering | ( | boolean | thundering | ) |
Set whether it is thundering.
| thundering | Whether it is thundering |
Referenced by org.bukkit.command.defaults.WeatherCommand.execute().
| void org.bukkit.World.setTicksPerAnimalSpawns | ( | int | ticksPerAnimalSpawns | ) |
Sets the world's ticks per animal spawns value.
This value determines how many ticks there are between attempts to spawn animals.
Example Usage:
Note: If set to 0, animal spawning will be disabled for this world. We recommend using setSpawnFlags(boolean, boolean) to control this instead.
Minecraft default: 400.
| ticksPerAnimalSpawns | the ticks per animal spawns value you want to set the world to |
| void org.bukkit.World.setTicksPerMonsterSpawns | ( | int | ticksPerMonsterSpawns | ) |
Sets the world's ticks per monster spawns value.
This value determines how many ticks there are between attempts to spawn monsters.
Example Usage:
Note: If set to 0, monsters spawning will be disabled for this world. We recommend using setSpawnFlags(boolean, boolean) to control this instead.
Minecraft default: 1.
| ticksPerMonsterSpawns | the ticks per monster spawns value you want to set the world to |
| void org.bukkit.World.setTime | ( | long | time | ) |
Sets the relative in-game time on the server.
The relative time is analogous to hours * 1000
Note that setting the relative time below the current relative time will actually move the clock forward a day. If you require to rewind time, please see setFullTime
| time | The new relative time to set the in-game time to (in hours*1000) |
| void org.bukkit.World.setWaterAnimalSpawnLimit | ( | int | limit | ) |
Sets the limit for number of water animals that can spawn in a chunk in this world.
Note: If set to a negative number the world will use the server-wide spawn limit instead.
| void org.bukkit.World.setWeatherDuration | ( | int | duration | ) |
Set the remaining time in ticks of the current conditions.
| duration | Time in ticks |
Referenced by org.bukkit.command.defaults.WeatherCommand.execute().
| public<T extends Entity> T org.bukkit.World.spawn | ( | Location | location, |
| Class< T > | clazz | ||
| ) | throws IllegalArgumentException |
Spawn an entity of a specific class at the given Location.
| location | the Location to spawn the entity at |
| clazz | the class of the Entity to spawn |
| <T> | the class of the Entity to spawn |
| IllegalArgumentException | if either parameter is null or the Entity requested cannot be spawned |
| LivingEntity org.bukkit.World.spawnCreature | ( | Location | loc, |
| EntityType | type | ||
| ) |
Creates a creature at the given Location.
| loc | The location to spawn the creature |
| type | The creature to spawn |
| LivingEntity org.bukkit.World.spawnCreature | ( | Location | loc, |
| CreatureType | type | ||
| ) |
Creates a creature at the given Location.
| loc | The location to spawn the creature |
| type | The creature to spawn |
Creates a entity at the given Location.
| loc | The location to spawn the entity |
| type | The entity to spawn |
| FallingBlock org.bukkit.World.spawnFallingBlock | ( | Location | location, |
| Material | material, | ||
| byte | data | ||
| ) | throws IllegalArgumentException |
Spawn a FallingBlock entity at the given Location of the specified Material.
The material dictates what is falling. When the FallingBlock hits the ground, it will place that block.
The Material must be a block type, check with material.isBlock(). The Material may not be air.
| location | The Location to spawn the FallingBlock |
| material | The block Material type |
| data | The block data |
| FallingBlock org.bukkit.World.spawnFallingBlock | ( | Location | location, |
| int | blockId, | ||
| byte | blockData | ||
| ) | throws IllegalArgumentException |
Spawn a FallingBlock entity at the given Location of the specified blockId (converted to Material)
| location | The Location to spawn the FallingBlock |
| blockId | see { |
| blockData | The block data |
| IllegalArgumentException | see { |
| LightningStrike org.bukkit.World.strikeLightning | ( | Location | loc | ) |
Strikes lightning at the given Location.
| loc | The location to strike lightning |
| LightningStrike org.bukkit.World.strikeLightningEffect | ( | Location | loc | ) |
Strikes lightning at the given Location without doing damage.
| loc | The location to strike lightning |
| boolean org.bukkit.World.unloadChunk | ( | Chunk | chunk | ) |
Safely unloads and saves the Chunk at the specified coordinates.
This method is analogous to unloadChunk(int, int, boolean, boolean) where safe and saveis true
| chunk | the chunk to unload |
| boolean org.bukkit.World.unloadChunk | ( | int | x, |
| int | z | ||
| ) |
Safely unloads and saves the Chunk at the specified coordinates.
This method is analogous to unloadChunk(int, int, boolean, boolean) where safe and saveis true
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| boolean org.bukkit.World.unloadChunk | ( | int | x, |
| int | z, | ||
| boolean | save | ||
| ) |
Safely unloads and optionally saves the Chunk at the specified coordinates.
This method is analogous to unloadChunk(int, int, boolean, boolean) where save is true
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| save | Whether or not to save the chunk |
| boolean org.bukkit.World.unloadChunk | ( | int | x, |
| int | z, | ||
| boolean | save, | ||
| boolean | safe | ||
| ) |
Unloads and optionally saves the Chunk at the specified coordinates.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| save | Controls whether the chunk is saved |
| safe | Controls whether to unload the chunk when players are nearby |
| boolean org.bukkit.World.unloadChunkRequest | ( | int | x, |
| int | z | ||
| ) |
Safely queues the Chunk at the specified coordinates for unloading.
This method is analogous to unloadChunkRequest(int, int, boolean) where safe is true
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| boolean org.bukkit.World.unloadChunkRequest | ( | int | x, |
| int | z, | ||
| boolean | safe | ||
| ) |
Queues the Chunk at the specified coordinates for unloading.
| x | X-coordinate of the chunk |
| z | Z-coordinate of the chunk |
| safe | Controls whether to queue the chunk when players are nearby |