public class GeyserSession extends Object implements CommandSender
| Constructor and Description |
|---|
GeyserSession(GeyserConnector connector,
com.nukkitx.protocol.bedrock.BedrockServerSession bedrockServerSession) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTeleport(TeleportCache teleportCache) |
void |
authenticate(String username) |
void |
authenticate(String username,
String password) |
void |
close() |
boolean |
confirmTeleport(com.nukkitx.math.vector.Vector3d position) |
void |
connect(RemoteServer remoteServer) |
void |
disconnect(String reason) |
String |
getLocale()
Returns the locale of the command sender.
|
String |
getName() |
InetSocketAddress |
getSocketAddress() |
Boolean |
hasPermission(String permission)
Checks if the given session's player has a permission
|
boolean |
isConsole() |
void |
login() |
void |
refreshEmotes(List<UUID> emotes) |
void |
sendAdventureSettings()
Send an AdventureSettingsPacket to the client with the latest flags
|
void |
sendDownstreamPacket(com.github.steveice10.packetlib.packet.Packet packet)
Send a packet to the remote server.
|
void |
sendForm(FormWindow window) |
void |
sendForm(FormWindow window,
int id) |
void |
sendGameRule(String gameRule,
Object value)
Send a gamerule value to the client
|
void |
sendMessage(String message) |
void |
sendUpstreamPacket(com.nukkitx.protocol.bedrock.BedrockPacket packet)
Queue a packet to be sent to player.
|
void |
sendUpstreamPacketImmediately(com.nukkitx.protocol.bedrock.BedrockPacket packet)
Send a packet immediately to the player.
|
void |
setAuthenticationData(AuthData authData) |
void |
setReducedDebugInfo(boolean value)
Update the cached value for the reduced debug info gamerule.
|
void |
setRenderDistance(int renderDistance) |
void |
setSneaking(boolean sneaking) |
void |
updateStatistics(@NonNull Map<com.github.steveice10.mc.protocol.data.game.statistic.Statistic,Integer> statistics)
Used for updating statistic values since we only get changes from the server
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsendMessagepublic GeyserSession(GeyserConnector connector, com.nukkitx.protocol.bedrock.BedrockServerSession bedrockServerSession)
public void connect(RemoteServer remoteServer)
public void login()
public void authenticate(String username)
public void disconnect(String reason)
public void close()
public void setAuthenticationData(AuthData authData)
public void setSneaking(boolean sneaking)
public String getName()
getName in interface CommandSenderpublic void sendMessage(String message)
sendMessage in interface CommandSenderpublic boolean isConsole()
isConsole in interface CommandSenderpublic String getLocale()
CommandSenderLanguageUtils.getDefaultLocale().getLocale in interface CommandSenderpublic void sendForm(FormWindow window, int id)
public void setRenderDistance(int renderDistance)
public InetSocketAddress getSocketAddress()
public void sendForm(FormWindow window)
public void addTeleport(TeleportCache teleportCache)
public boolean confirmTeleport(com.nukkitx.math.vector.Vector3d position)
public void sendUpstreamPacket(com.nukkitx.protocol.bedrock.BedrockPacket packet)
packet - the bedrock packet from the NukkitX protocol libpublic void sendUpstreamPacketImmediately(com.nukkitx.protocol.bedrock.BedrockPacket packet)
packet - the bedrock packet from the NukkitX protocol libpublic void sendDownstreamPacket(com.github.steveice10.packetlib.packet.Packet packet)
packet - the java edition packet from MCProtocolLibpublic void setReducedDebugInfo(boolean value)
value - The new value for reducedDebugInfopublic void sendGameRule(String gameRule, Object value)
gameRule - The gamerule to sendvalue - The value of the gamerulepublic Boolean hasPermission(String permission)
permission - The permission node to checkpublic void sendAdventureSettings()
public void updateStatistics(@NonNull
@NonNull Map<com.github.steveice10.mc.protocol.data.game.statistic.Statistic,Integer> statistics)
statistics - Updated statistics valuesCopyright © 2020 GeyserMC. All rights reserved.