public abstract class WorldManager extends Object
| Constructor and Description |
|---|
WorldManager() |
| Modifier and Type | Method and Description |
|---|---|
abstract int[] |
getBiomeDataAt(GeyserSession session,
int x,
int z)
Gets the Java biome data for the specified chunk.
|
abstract int |
getBlockAt(GeyserSession session,
int x,
int y,
int z)
Gets the Java block state at the specified location
|
int |
getBlockAt(GeyserSession session,
com.github.steveice10.mc.protocol.data.game.entity.metadata.Position position)
Gets the Java block state at the specified location
|
int |
getBlockAt(GeyserSession session,
com.nukkitx.math.vector.Vector3i vector)
Gets the Java block state at the specified location
|
abstract void |
getBlocksInSection(GeyserSession session,
int x,
int y,
int z,
com.github.steveice10.mc.protocol.data.game.chunk.Chunk section)
Gets all block states in the specified chunk section.
|
abstract Boolean |
getGameRuleBool(GeyserSession session,
GameRule gameRule)
Gets a gamerule value as a boolean
|
abstract int |
getGameRuleInt(GeyserSession session,
GameRule gameRule)
Get a gamerule value as an integer
|
abstract boolean |
hasMoreBlockDataThanChunkCache()
Checks whether or not this world manager has access to more block data than the chunk cache.
|
abstract boolean |
hasPermission(GeyserSession session,
String permission)
Checks if the given session's player has a permission
|
abstract void |
setDifficulty(GeyserSession session,
com.github.steveice10.mc.protocol.data.game.setting.Difficulty difficulty)
Change the difficulty of the Java server
|
abstract void |
setGameRule(GeyserSession session,
String name,
Object value)
Updates a gamerule value on the Java server
|
abstract void |
setPlayerGameMode(GeyserSession session,
com.github.steveice10.mc.protocol.data.game.entity.player.GameMode gameMode)
Change the game mode of the given session
|
public int getBlockAt(GeyserSession session, com.github.steveice10.mc.protocol.data.game.entity.metadata.Position position)
session - the sessionposition - the positionpublic int getBlockAt(GeyserSession session, com.nukkitx.math.vector.Vector3i vector)
session - the sessionvector - the positionpublic abstract int getBlockAt(GeyserSession session, int x, int y, int z)
session - the sessionx - the x coordinate to get the block aty - the y coordinate to get the block atz - the z coordinate to get the block atpublic abstract void getBlocksInSection(GeyserSession session, int x, int y, int z, com.github.steveice10.mc.protocol.data.game.chunk.Chunk section)
session - the sessionx - the chunk's X coordinatey - the chunk's Y coordinatez - the chunk's Z coordinatesection - the chunk section to store the block data inpublic abstract boolean hasMoreBlockDataThanChunkCache()
Some world managers (e.g. Spigot) can provide access to block data outside of the chunk cache, and even with chunk caching disabled. This method provides a means to check if this manager has this capability.
public abstract int[] getBiomeDataAt(GeyserSession session, int x, int z)
session - the session of the playerx - the chunk's X coordinatez - the chunk's Z coordinatepublic abstract void setGameRule(GeyserSession session, String name, Object value)
session - The session of the user that requested the changename - The gamerule to changevalue - The new value for the gamerulepublic abstract Boolean getGameRuleBool(GeyserSession session, GameRule gameRule)
session - The session of the user that requested the valuegameRule - The gamerule to fetch the value ofpublic abstract int getGameRuleInt(GeyserSession session, GameRule gameRule)
session - The session of the user that requested the valuegameRule - The gamerule to fetch the value ofpublic abstract void setPlayerGameMode(GeyserSession session, com.github.steveice10.mc.protocol.data.game.entity.player.GameMode gameMode)
session - The session of the player to change the game mode ofgameMode - The game mode to change the player topublic abstract void setDifficulty(GeyserSession session, com.github.steveice10.mc.protocol.data.game.setting.Difficulty difficulty)
session - The session of the user that requested the changedifficulty - The difficulty to change topublic abstract boolean hasPermission(GeyserSession session, String permission)
session - The session of the player to check the permission ofpermission - The permission node to checkCopyright © 2020 GeyserMC. All rights reserved.