public abstract class World extends Object implements NegativityObject
Constructor and Description |
---|
World() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Block |
getBlockAt(double x,
double y,
double z)
Get the block at the specified location on this world
Return a block with AIR type if not found
Try to load from cache or get with getBlockAt0(int, int, int) |
Block |
getBlockAt(int x,
int y,
int z)
Get the block at the specified location on this world
Return a block with AIR type if not found
Try to load from cache or get with getBlockAt0(int, int, int) |
Block |
getBlockAt(Location loc)
Get the block at the specified location on this world
Return a block with AIR type if not found
Try to load from cache or get with getBlockAt0(int, int, int) |
Block |
getBlockAt(Vector v)
Get the block at the specified location on this world
Return a block with AIR type if not found
Try to load from cache or get with getBlockAt0(int, int, int) |
abstract Block |
getBlockAt0(int x,
int y,
int z)
Get the block at the specified location on this world
Return a block with AIR type if not found
Can create error if world not loaded AND loading it async Load directly from world |
abstract Block |
getBlockAt0(Location loc)
Get the block at the specified location on this world
Return a block with AIR type if not found
Can create error if world not loaded AND loading it async Load directly from world |
abstract Difficulty |
getDifficulty()
Get the world difficulty
|
abstract List<Entity> |
getEntities()
Get all entities on this world
|
Entity |
getEntityWithID(int entityId)
Get an entity by the ID
|
abstract int |
getMaxHeight()
Get the max height of the world
|
abstract int |
getMinHeight()
Get the min height of the world
|
abstract String |
getName()
Get the world name
|
static World |
getWorld(String name)
Get world instance
|
static World |
getWorld(String name,
Function<String,World> worldFunction)
Get world instance
|
static ConcurrentHashMap<String,World> |
getWorlds() |
abstract boolean |
isPVP()
Know if the pvp is enabled in this world.
|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefault
public static ConcurrentHashMap<String,World> getWorlds()
public static World getWorld(String name)
name
- the name of worldpublic static World getWorld(String name, Function<String,World> worldFunction)
name
- the name of worldworldFunction
- create the world that will be storedpublic abstract String getName()
public Block getBlockAt(int x, int y, int z)
getBlockAt0(int, int, int)
x
- The X block locationy
- The Y block locationz
- The Z block locationpublic Block getBlockAt(double x, double y, double z)
getBlockAt0(int, int, int)
x
- The X block locationy
- The Y block locationz
- The Z block locationpublic Block getBlockAt(Vector v)
getBlockAt0(int, int, int)
v
- the block vector positionpublic Block getBlockAt(Location loc)
getBlockAt0(int, int, int)
loc
- the block locationpublic abstract Block getBlockAt0(Location loc)
loc
- the block locationpublic abstract Block getBlockAt0(int x, int y, int z)
x
- The X block locationy
- The Y block locationz
- The Z block locationpublic abstract List<Entity> getEntities()
@Nullable public Entity getEntityWithID(int entityId)
entityId
- the ID of the entitypublic abstract Difficulty getDifficulty()
public abstract int getMaxHeight()
public abstract int getMinHeight()
public abstract boolean isPVP()