FourKit 29eeeb8
The LCE C# Server Plugin API
Loading...
Searching...
No Matches
Minecraft.Server.FourKit.World Class Reference

Represents a world, which may contain entities, chunks and blocks. More...

Public Member Functions

int getDimensionId ()
 Gets the dimension ID of this world.
string getName ()
 Gets the unique name of this world.
Block.Block getBlockAt (int x, int y, int z)
 Gets the Block at the given coordinates.
Block.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.Block getHighestBlockAt (int x, int z)
 Gets the highest non-empty block at the given coordinates.
Block.Block getHighestBlockAt (Location location)
 Gets the highest non-empty block at the given Location.
Location getSpawnLocation ()
 Gets the default spawn Location of this world.
bool setSpawnLocation (int x, int y, int z)
 Sets the spawn location of the world.
long getSeed ()
 Gets the Seed for this 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.
void setFullTime (long time)
 Sets the in-game time on the server.
void setStorm (bool hasStorm)
 Set whether there is a storm.
void setThundering (bool thundering)
 Set whether it is thundering.
void setThunderDuration (int duration)
 Set the thundering duration.
List< PlayergetPlayers ()
 Get a list of all players in this World.
List< Entity.EntitygetEntities ()
 Get a list of all entities in this World.
List< Entity.LivingEntitygetLivingEntities ()
 Get a list of all living entities in this World.
bool createExplosion (double x, double y, double z, float power)
 Creates explosion at given coordinates with given power.
bool createExplosion (double x, double y, double z, float power, bool setFire)
 Creates explosion at given coordinates with given power and optionally setting blocks on fire.
bool createExplosion (double x, double y, double z, float power, bool setFire, bool breakBlocks)
 Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.
bool createExplosion (Location loc, float power, bool setFire, bool breakBlocks)
 Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.
bool createExplosion (Location loc, float power)
 Creates explosion at given coordinates with given power.
bool createExplosion (Location loc, float power, bool setFire)
 Creates explosion at given coordinates with given power and optionally setting blocks on fire.
bool strikeLightning (Location loc)
 Strikes lightning at the given Location.
bool strikeLightningEffect (Location loc)
 Strikes lightning at the given Location without doing damage.
void dropItem (Location location, ItemStack item)
 Drops an item at the specified Location.
void dropItemNaturally (Location location, ItemStack item)
 Drops an item at the specified Location with a random offset.
Chunk.Chunk getChunkAt (int x, int z)
 Gets the Chunk at the given coordinates.
Chunk.Chunk getChunkAt (Location location)
 Gets the Chunk at the given Location.
Chunk.Chunk getChunkAt (Block.Block block)
 Gets the Chunk that contains the given Block.
bool isChunkLoaded (Chunk.Chunk chunk)
 Checks if the specified Chunk is loaded.
bool isChunkLoaded (int x, int z)
 Checks if the Chunk at the specified coordinates is loaded.
Chunk.Chunk[] getLoadedChunks ()
 Gets an array of all loaded Chunks.
void loadChunk (Chunk.Chunk chunk)
 Loads the specified Chunk.
void 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.
bool loadChunk (int x, int z, bool generate)
 Loads the Chunk at the specified coordinates.
bool isChunkInUse (int x, int z)
 Checks if the Chunk at the specified coordinates is loaded and in use by one or more players.
bool unloadChunk (Chunk.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 save is true.
bool 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 save is true.
bool unloadChunk (int x, int z, bool save)
 Safely unloads and optionally saves the Chunk at the specified coordinates.
bool unloadChunk (int x, int z, bool save, bool safe)
 Unloads and optionally saves the Chunk at the specified coordinates.
bool 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.
bool unloadChunkRequest (int x, int z, bool safe)
 Queues the Chunk at the specified coordinates for unloading.
bool regenerateChunk (int x, int z)
 Regenerates the Chunk at the specified coordinates.
bool refreshChunk (int x, int z)
 Resends the Chunk to all clients.

Detailed Description

Represents a world, which may contain entities, chunks and blocks.

Member Function Documentation

◆ createExplosion() [1/6]

bool Minecraft.Server.FourKit.World.createExplosion ( double x,
double y,
double z,
float power )

Creates explosion at given coordinates with given power.

Parameters
xX-coordinate.
yY-coordinate.
zZ-coordinate.
powerThe power of explosion, where 4F is TNT.
Returns
false if explosion was canceled, otherwise true.

◆ createExplosion() [2/6]

bool Minecraft.Server.FourKit.World.createExplosion ( double x,
double y,
double z,
float power,
bool setFire )

Creates explosion at given coordinates with given power and optionally setting blocks on fire.

Parameters
xX-coordinate.
yY-coordinate.
zZ-coordinate.
powerThe power of explosion, where 4F is TNT.
setFireWhether or not to set blocks on fire.
Returns
false if explosion was canceled, otherwise true.

◆ createExplosion() [3/6]

bool Minecraft.Server.FourKit.World.createExplosion ( double x,
double y,
double z,
float power,
bool setFire,
bool breakBlocks )

Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.

Parameters
xX-coordinate.
yY-coordinate.
zZ-coordinate.
powerThe power of explosion, where 4F is TNT.
setFireWhether or not to set blocks on fire.
breakBlocksWhether or not to have blocks be destroyed.
Returns
false if explosion was canceled, otherwise true.

◆ createExplosion() [4/6]

bool Minecraft.Server.FourKit.World.createExplosion ( Location loc,
float power )

Creates explosion at given coordinates with given power.

Parameters
locLocation to blow up.
powerThe power of explosion, where 4F is TNT.
Returns
false if explosion was canceled, otherwise true.

◆ createExplosion() [5/6]

bool Minecraft.Server.FourKit.World.createExplosion ( Location loc,
float power,
bool setFire )

Creates explosion at given coordinates with given power and optionally setting blocks on fire.

Parameters
locLocation to blow up.
powerThe power of explosion, where 4F is TNT.
setFireWhether or not to set blocks on fire.
Returns
false if explosion was canceled, otherwise true.

◆ createExplosion() [6/6]

bool Minecraft.Server.FourKit.World.createExplosion ( Location loc,
float power,
bool setFire,
bool breakBlocks )

Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks.

Parameters
locLocation to blow up.
powerThe power of explosion, where 4F is TNT.
setFireWhether or not to set blocks on fire.
breakBlocksWhether or not to have blocks be destroyed.
Returns
false if explosion was canceled, otherwise true.

◆ dropItem()

void Minecraft.Server.FourKit.World.dropItem ( Location location,
ItemStack item )

Drops an item at the specified Location.

Parameters
locationLocation to drop the item.
itemItemStack to drop.

◆ dropItemNaturally()

void Minecraft.Server.FourKit.World.dropItemNaturally ( Location location,
ItemStack item )

Drops an item at the specified Location with a random offset.

Parameters
locationLocation to drop the item.
itemItemStack to drop.

◆ getBlockAt() [1/2]

Block.Block Minecraft.Server.FourKit.World.getBlockAt ( int x,
int y,
int z )

Gets the Block at the given coordinates.

Parameters
xX-coordinate of the block.
yY-coordinate of the block.
zZ-coordinate of the block.
Returns
Block at the given coordinates.

◆ getBlockAt() [2/2]

Block.Block Minecraft.Server.FourKit.World.getBlockAt ( Location location)

Gets the Block at the given Location.

Parameters
locationLocation of the block.
Returns
Block at the given location.

◆ getBlockTypeIdAt() [1/2]

int Minecraft.Server.FourKit.World.getBlockTypeIdAt ( int x,
int y,
int z )

Gets the block type ID at the given coordinates.

Parameters
xX-coordinate of the block.
yY-coordinate of the block.
zZ-coordinate of the block.
Returns
Type ID of the block.

◆ getBlockTypeIdAt() [2/2]

int Minecraft.Server.FourKit.World.getBlockTypeIdAt ( Location location)

Gets the block type ID at the given Location.

Parameters
locationLocation of the block.
Returns
Type ID of the block.

◆ getChunkAt() [1/3]

Chunk.Chunk Minecraft.Server.FourKit.World.getChunkAt ( Block.Block block)

Gets the Chunk that contains the given Block.

Parameters
blockBlock to get the containing chunk from.
Returns
The chunk that contains the given block.

◆ getChunkAt() [2/3]

Chunk.Chunk Minecraft.Server.FourKit.World.getChunkAt ( int x,
int z )

Gets the Chunk at the given coordinates.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
Returns
Chunk at the given coordinates.

◆ getChunkAt() [3/3]

Chunk.Chunk Minecraft.Server.FourKit.World.getChunkAt ( Location location)

Gets the Chunk at the given Location.

Parameters
locationLocation of the chunk.
Returns
Chunk at the given location.

◆ getDimensionId()

int Minecraft.Server.FourKit.World.getDimensionId ( )

Gets the dimension ID of this world.

Returns
Dimension ID of this world.

◆ getEntities()

List< Entity.Entity > Minecraft.Server.FourKit.World.getEntities ( )

Get a list of all entities in this World.

Returns
A list of all Entities currently residing in this world.

◆ getHighestBlockAt() [1/2]

Block.Block Minecraft.Server.FourKit.World.getHighestBlockAt ( int x,
int z )

Gets the highest non-empty block at the given coordinates.

Parameters
xX-coordinate.
zZ-coordinate.
Returns
Highest non-empty block.

◆ getHighestBlockAt() [2/2]

Block.Block Minecraft.Server.FourKit.World.getHighestBlockAt ( Location location)

Gets the highest non-empty block at the given Location.

Parameters
locationCoordinates to get the highest block at.
Returns
Highest non-empty block.

◆ getHighestBlockYAt() [1/2]

int Minecraft.Server.FourKit.World.getHighestBlockYAt ( int x,
int z )

Gets the highest non-air coordinate at the given coordinates.

Parameters
xX-coordinate.
zZ-coordinate.
Returns
The Y-coordinate of the highest non-air block.

◆ getHighestBlockYAt() [2/2]

int Minecraft.Server.FourKit.World.getHighestBlockYAt ( Location location)

Gets the highest non-air coordinate at the given Location.

Parameters
locationLocation to check.
Returns
The Y-coordinate of the highest non-air block.

◆ getLivingEntities()

List< Entity.LivingEntity > Minecraft.Server.FourKit.World.getLivingEntities ( )

Get a list of all living entities in this World.

Returns
A list of all LivingEntities currently residing in this world.

◆ getLoadedChunks()

Chunk.Chunk[] Minecraft.Server.FourKit.World.getLoadedChunks ( )

Gets an array of all loaded Chunks.

Returns
Chunk[] containing all loaded chunks.

◆ getName()

string Minecraft.Server.FourKit.World.getName ( )

Gets the unique name of this world.

Returns
Name of this world.

◆ getPlayers()

List< Player > Minecraft.Server.FourKit.World.getPlayers ( )

Get a list of all players in this World.

Returns
A list of all Players currently residing in this world.

◆ getSeed()

long Minecraft.Server.FourKit.World.getSeed ( )

Gets the Seed for this world.

Returns
This world's Seed.

◆ getSpawnLocation()

Location Minecraft.Server.FourKit.World.getSpawnLocation ( )

Gets the default spawn Location of this world.

Returns
The spawn location of this world.

◆ getTime()

long Minecraft.Server.FourKit.World.getTime ( )

Gets the relative in-game time of this world.

Returns
The current relative time.

◆ isChunkInUse()

bool Minecraft.Server.FourKit.World.isChunkInUse ( int x,
int z )

Checks if the Chunk at the specified coordinates is loaded and in use by one or more players.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
Returns
true if the chunk is loaded and in use by one or more players, otherwise false.

◆ isChunkLoaded() [1/2]

bool Minecraft.Server.FourKit.World.isChunkLoaded ( Chunk.Chunk chunk)

Checks if the specified Chunk is loaded.

Parameters
chunkThe chunk to check.
Returns
true if the chunk is loaded, otherwise false.

◆ isChunkLoaded() [2/2]

bool Minecraft.Server.FourKit.World.isChunkLoaded ( int x,
int z )

Checks if the Chunk at the specified coordinates is loaded.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
Returns
true if the chunk is loaded, otherwise false.

◆ loadChunk() [1/3]

void Minecraft.Server.FourKit.World.loadChunk ( Chunk.Chunk chunk)

Loads the specified Chunk.

Parameters
chunkThe chunk to load.

◆ loadChunk() [2/3]

void Minecraft.Server.FourKit.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.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.

◆ loadChunk() [3/3]

bool Minecraft.Server.FourKit.World.loadChunk ( int x,
int z,
bool generate )

Loads the Chunk at the specified coordinates.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
generateWhether or not to generate a chunk if it doesn't already exist.
Returns
true if the chunk has loaded successfully, otherwise false.

◆ refreshChunk()

bool Minecraft.Server.FourKit.World.refreshChunk ( int x,
int z )

Resends the Chunk to all clients.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
Returns
Whether the chunk was actually refreshed.

◆ regenerateChunk()

bool Minecraft.Server.FourKit.World.regenerateChunk ( int x,
int z )

Regenerates the Chunk at the specified coordinates.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
Returns
Whether the chunk was actually regenerated.

◆ setFullTime()

void Minecraft.Server.FourKit.World.setFullTime ( long time)

Sets the in-game time on the server.

Parameters
timeThe new absolute time to set this world to.

◆ setSpawnLocation()

bool Minecraft.Server.FourKit.World.setSpawnLocation ( int x,
int y,
int z )

Sets the spawn location of the world.

Parameters
xX-coordinate.
yY-coordinate.
zZ-coordinate.
Returns
True if the spawn was set successfully.

◆ setStorm()

void Minecraft.Server.FourKit.World.setStorm ( bool hasStorm)

Set whether there is a storm.

Parameters
hasStormWhether there is rain and snow.

◆ setThunderDuration()

void Minecraft.Server.FourKit.World.setThunderDuration ( int duration)

Set the thundering duration.

Parameters
durationDuration in ticks.

◆ setThundering()

void Minecraft.Server.FourKit.World.setThundering ( bool thundering)

Set whether it is thundering.

Parameters
thunderingWhether it is thundering.

◆ setTime()

void Minecraft.Server.FourKit.World.setTime ( long time)

Sets the relative in-game time on the server.

Parameters
timeThe new relative time to set the in-game time to.

◆ strikeLightning()

bool Minecraft.Server.FourKit.World.strikeLightning ( Location loc)

Strikes lightning at the given Location.

Parameters
locThe location to strike lightning.
Returns
true if lightning was successfully summoned.

◆ strikeLightningEffect()

bool Minecraft.Server.FourKit.World.strikeLightningEffect ( Location loc)

Strikes lightning at the given Location without doing damage.

Parameters
locThe location to strike lightning.
Returns
true if lightning was successfully summoned.

◆ unloadChunk() [1/4]

bool Minecraft.Server.FourKit.World.unloadChunk ( Chunk.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 save is true.

Parameters
chunkThe chunk to unload.
Returns
true if the chunk has unloaded successfully, otherwise false.

◆ unloadChunk() [2/4]

bool Minecraft.Server.FourKit.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 save is true.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
Returns
true if the chunk has unloaded successfully, otherwise false.

◆ unloadChunk() [3/4]

bool Minecraft.Server.FourKit.World.unloadChunk ( int x,
int z,
bool save )

Safely unloads and optionally saves the Chunk at the specified coordinates.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
saveWhether or not to save the chunk.
Returns
true if the chunk has unloaded successfully, otherwise false.

◆ unloadChunk() [4/4]

bool Minecraft.Server.FourKit.World.unloadChunk ( int x,
int z,
bool save,
bool safe )

Unloads and optionally saves the Chunk at the specified coordinates.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
saveControls whether the chunk is saved.
safeControls whether to unload the chunk when players are nearby.
Returns
true if the chunk has unloaded successfully, otherwise false.

◆ unloadChunkRequest() [1/2]

bool Minecraft.Server.FourKit.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.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
Returns
true is the queue attempt was successful, otherwise false.

◆ unloadChunkRequest() [2/2]

bool Minecraft.Server.FourKit.World.unloadChunkRequest ( int x,
int z,
bool safe )

Queues the Chunk at the specified coordinates for unloading.

Parameters
xX-coordinate of the chunk.
zZ-coordinate of the chunk.
safeControls whether to queue the chunk when players are nearby.
Returns
Whether the chunk was actually queued.

The documentation for this class was generated from the following file:
  • Minecraft.Server.FourKit/World.cs