public class GeyserWorldManager extends WorldManager
| Constructor and Description |
|---|
GeyserWorldManager() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getBiomeDataAt(GeyserSession session,
int x,
int z)
Gets the Java biome data for the specified chunk.
|
int |
getBlockAt(GeyserSession session,
int x,
int y,
int z)
Gets the Java block state at the specified location
|
void |
getBlocksInSection(GeyserSession session,
int x,
int y,
int z,
com.github.steveice10.mc.protocol.data.game.chunk.Chunk chunk)
Gets all block states in the specified chunk section.
|
Boolean |
getGameRuleBool(GeyserSession session,
GameRule gameRule)
Gets a gamerule value as a boolean
|
int |
getGameRuleInt(GeyserSession session,
GameRule gameRule)
Get a gamerule value as an integer
|
boolean |
hasMoreBlockDataThanChunkCache()
Checks whether or not this world manager has access to more block data than the chunk cache.
|
boolean |
hasPermission(GeyserSession session,
String permission)
Checks if the given session's player has a permission
|
void |
setDifficulty(GeyserSession session,
com.github.steveice10.mc.protocol.data.game.setting.Difficulty difficulty)
Change the difficulty of the Java server
|
void |
setGameRule(GeyserSession session,
String name,
Object value)
Updates a gamerule value on the Java server
|
void |
setPlayerGameMode(GeyserSession session,
com.github.steveice10.mc.protocol.data.game.entity.player.GameMode gameMode)
Change the game mode of the given session
|
getBlockAt, getBlockAtpublic int getBlockAt(GeyserSession session, int x, int y, int z)
WorldManagergetBlockAt in class WorldManagersession - 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 void getBlocksInSection(GeyserSession session, int x, int y, int z, com.github.steveice10.mc.protocol.data.game.chunk.Chunk chunk)
WorldManagergetBlocksInSection in class WorldManagersession - the sessionx - the chunk's X coordinatey - the chunk's Y coordinatez - the chunk's Z coordinatechunk - the chunk section to store the block data inpublic boolean hasMoreBlockDataThanChunkCache()
WorldManagerSome 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.
hasMoreBlockDataThanChunkCache in class WorldManagerpublic int[] getBiomeDataAt(GeyserSession session, int x, int z)
WorldManagergetBiomeDataAt in class WorldManagersession - the session of the playerx - the chunk's X coordinatez - the chunk's Z coordinatepublic void setGameRule(GeyserSession session, String name, Object value)
WorldManagersetGameRule in class WorldManagersession - The session of the user that requested the changename - The gamerule to changevalue - The new value for the gamerulepublic Boolean getGameRuleBool(GeyserSession session, GameRule gameRule)
WorldManagergetGameRuleBool in class WorldManagersession - The session of the user that requested the valuegameRule - The gamerule to fetch the value ofpublic int getGameRuleInt(GeyserSession session, GameRule gameRule)
WorldManagergetGameRuleInt in class WorldManagersession - The session of the user that requested the valuegameRule - The gamerule to fetch the value ofpublic void setPlayerGameMode(GeyserSession session, com.github.steveice10.mc.protocol.data.game.entity.player.GameMode gameMode)
WorldManagersetPlayerGameMode in class WorldManagersession - The session of the player to change the game mode ofgameMode - The game mode to change the player topublic void setDifficulty(GeyserSession session, com.github.steveice10.mc.protocol.data.game.setting.Difficulty difficulty)
WorldManagersetDifficulty in class WorldManagersession - The session of the user that requested the changedifficulty - The difficulty to change topublic boolean hasPermission(GeyserSession session, String permission)
WorldManagerhasPermission in class WorldManagersession - The session of the player to check the permission ofpermission - The permission node to checkCopyright © 2020 GeyserMC. All rights reserved.