public class ClientGameSession
extends java.lang.Object
implements com.mojang.bridge.game.GameSession
| コンストラクタと説明 |
|---|
ClientGameSession(ClientWorld p_i51152_1_,
ClientPlayerEntity p_i51152_2_,
ClientPlayNetHandler p_i51152_3_) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.String |
getDifficulty()
The name of the difficulty currently used.
|
java.lang.String |
getGameMode()
The name of the current game mode being played.
|
int |
getPlayerCount()
The number of real human Players currently playing in this session.
|
java.util.UUID |
getSessionId()
Gets the session ID of this game session.
|
boolean |
isRemoteServer()
Returns true if this game session is hosted remotely.
|
public ClientGameSession(ClientWorld p_i51152_1_, ClientPlayerEntity p_i51152_2_, ClientPlayNetHandler p_i51152_3_)
public int getPlayerCount()
com.mojang.bridge.game.GameSessionAs the definition of "multiplayer" is rather loose - this method can be combined with
GameSession.isRemoteServer() to determine if the player is playing alone or with others, locally or remotely.
getPlayerCount インタフェース内 com.mojang.bridge.game.GameSessionpublic boolean isRemoteServer()
com.mojang.bridge.game.GameSessionAs the definition of "multiplayer" is rather loose - this method can be combined with
GameSession.getPlayerCount() to determine if the player is playing alone or with others, locally or remotely.
isRemoteServer インタフェース内 com.mojang.bridge.game.GameSessionpublic java.lang.String getDifficulty()
com.mojang.bridge.game.GameSessionThis name will be in the form of "peaceful" or "hard", but the precise values may change over time.
getDifficulty インタフェース内 com.mojang.bridge.game.GameSessionpublic java.lang.String getGameMode()
com.mojang.bridge.game.GameSessionThis name will be in the form of "survival" or "spectator", but the precise values may change over time.
This value only covers the current active players game mode, and not the general game mode of the session as a whole.
getGameMode インタフェース内 com.mojang.bridge.game.GameSessionpublic java.util.UUID getSessionId()
com.mojang.bridge.game.GameSessionThis is useful for keeping track of if the player is in the same session, or has left and joined a new one.
getSessionId インタフェース内 com.mojang.bridge.game.GameSession