Package com.mojang.realmsclient.client
Class RealmsClient
- java.lang.Object
-
- com.mojang.realmsclient.client.RealmsClient
-
public class RealmsClient extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RealmsClient.CompatibleVersionResponse
static class
RealmsClient.Environment
-
Field Summary
Fields Modifier and Type Field Description static RealmsClient.Environment
currentEnvironment
private static PersistenceSerializer
GSON
private static boolean
initialized
private static org.apache.logging.log4j.Logger
LOGGER
private Minecraft
minecraft
private java.lang.String
sessionId
private java.lang.String
username
-
Constructor Summary
Constructors Constructor Description RealmsClient(java.lang.String p_i244721_1_, java.lang.String p_i244721_2_, Minecraft p_i244721_3_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptInvitation(java.lang.String p_224901_1_)
void
agreeToTos()
BackupList
backupsFor(long p_224923_1_)
RealmsClient.CompatibleVersionResponse
clientCompatible()
java.lang.Boolean
close(long p_224932_1_)
static RealmsClient
create()
void
deleteWorld(long p_224916_1_)
Ops
deop(long p_224929_1_, java.lang.String p_224929_3_)
private java.lang.String
execute(Request<?> p_224938_1_)
WorldTemplatePaginatedList
fetchWorldTemplates(int p_224930_1_, int p_224930_2_, RealmsServer.ServerType p_224930_3_)
RealmsServerPlayerLists
getLiveStats()
RealmsNews
getNews()
RealmsServer
getOwnWorld(long p_224935_1_)
void
initializeWorld(long p_224900_1_, java.lang.String p_224900_3_, java.lang.String p_224900_4_)
RealmsServer
invite(long p_224910_1_, java.lang.String p_224910_3_)
private boolean
isBlocked(PendingInvite p_244733_1_)
RealmsServerAddress
join(long p_224904_1_)
RealmsServerList
listWorlds()
java.lang.Boolean
mcoEnabled()
Ops
op(long p_224906_1_, java.lang.String p_224906_3_)
java.lang.Boolean
open(long p_224942_1_)
PendingInvitesList
pendingInvites()
int
pendingInvitesCount()
java.lang.Boolean
putIntoMinigameMode(long p_224905_1_, java.lang.String p_224905_3_)
void
rejectInvitation(java.lang.String p_224913_1_)
WorldDownload
requestDownloadInfo(long p_224917_1_, int p_224917_3_)
UploadInfo
requestUploadInfo(long p_224934_1_, java.lang.String p_224934_3_)
java.lang.Boolean
resetWorldWithSeed(long p_224943_1_, java.lang.String p_224943_3_, java.lang.Integer p_224943_4_, boolean p_224943_5_)
java.lang.Boolean
resetWorldWithTemplate(long p_224924_1_, java.lang.String p_224924_3_)
void
restoreWorld(long p_224928_1_, java.lang.String p_224928_3_)
void
sendPingResults(PingResult p_224903_1_)
java.lang.Boolean
stageAvailable()
Subscription
subscriptionFor(long p_224933_1_)
boolean
switchSlot(long p_224927_1_, int p_224927_3_)
static void
switchToLocal()
static void
switchToProd()
static void
switchToStage()
java.lang.Boolean
trialAvailable()
void
uninvite(long p_224908_1_, java.lang.String p_224908_3_)
void
uninviteMyselfFrom(long p_224912_1_)
void
update(long p_224922_1_, java.lang.String p_224922_3_, java.lang.String p_224922_4_)
void
updateSlot(long p_224925_1_, int p_224925_3_, RealmsWorldOptions p_224925_4_)
private java.lang.String
url(java.lang.String p_224926_1_)
private java.lang.String
url(java.lang.String p_224907_1_, java.lang.String p_224907_2_)
-
-
-
Field Detail
-
currentEnvironment
public static RealmsClient.Environment currentEnvironment
-
initialized
private static boolean initialized
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
sessionId
private final java.lang.String sessionId
-
username
private final java.lang.String username
-
minecraft
private final Minecraft minecraft
-
GSON
private static final PersistenceSerializer GSON
-
-
Constructor Detail
-
RealmsClient
public RealmsClient(java.lang.String p_i244721_1_, java.lang.String p_i244721_2_, Minecraft p_i244721_3_)
-
-
Method Detail
-
create
public static RealmsClient create()
-
switchToStage
public static void switchToStage()
-
switchToProd
public static void switchToProd()
-
switchToLocal
public static void switchToLocal()
-
listWorlds
public RealmsServerList listWorlds() throws RealmsServiceException
- Throws:
RealmsServiceException
-
getOwnWorld
public RealmsServer getOwnWorld(long p_224935_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
getLiveStats
public RealmsServerPlayerLists getLiveStats() throws RealmsServiceException
- Throws:
RealmsServiceException
-
join
public RealmsServerAddress join(long p_224904_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
initializeWorld
public void initializeWorld(long p_224900_1_, java.lang.String p_224900_3_, java.lang.String p_224900_4_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
mcoEnabled
public java.lang.Boolean mcoEnabled() throws RealmsServiceException
- Throws:
RealmsServiceException
-
stageAvailable
public java.lang.Boolean stageAvailable() throws RealmsServiceException
- Throws:
RealmsServiceException
-
clientCompatible
public RealmsClient.CompatibleVersionResponse clientCompatible() throws RealmsServiceException
- Throws:
RealmsServiceException
-
uninvite
public void uninvite(long p_224908_1_, java.lang.String p_224908_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
uninviteMyselfFrom
public void uninviteMyselfFrom(long p_224912_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
invite
public RealmsServer invite(long p_224910_1_, java.lang.String p_224910_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
backupsFor
public BackupList backupsFor(long p_224923_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
update
public void update(long p_224922_1_, java.lang.String p_224922_3_, java.lang.String p_224922_4_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
updateSlot
public void updateSlot(long p_224925_1_, int p_224925_3_, RealmsWorldOptions p_224925_4_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
switchSlot
public boolean switchSlot(long p_224927_1_, int p_224927_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
restoreWorld
public void restoreWorld(long p_224928_1_, java.lang.String p_224928_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
fetchWorldTemplates
public WorldTemplatePaginatedList fetchWorldTemplates(int p_224930_1_, int p_224930_2_, RealmsServer.ServerType p_224930_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
putIntoMinigameMode
public java.lang.Boolean putIntoMinigameMode(long p_224905_1_, java.lang.String p_224905_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
op
public Ops op(long p_224906_1_, java.lang.String p_224906_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
deop
public Ops deop(long p_224929_1_, java.lang.String p_224929_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
open
public java.lang.Boolean open(long p_224942_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
close
public java.lang.Boolean close(long p_224932_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
resetWorldWithSeed
public java.lang.Boolean resetWorldWithSeed(long p_224943_1_, java.lang.String p_224943_3_, java.lang.Integer p_224943_4_, boolean p_224943_5_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
resetWorldWithTemplate
public java.lang.Boolean resetWorldWithTemplate(long p_224924_1_, java.lang.String p_224924_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
subscriptionFor
public Subscription subscriptionFor(long p_224933_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
pendingInvitesCount
public int pendingInvitesCount() throws RealmsServiceException
- Throws:
RealmsServiceException
-
pendingInvites
public PendingInvitesList pendingInvites() throws RealmsServiceException
- Throws:
RealmsServiceException
-
isBlocked
private boolean isBlocked(PendingInvite p_244733_1_)
-
acceptInvitation
public void acceptInvitation(java.lang.String p_224901_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
requestDownloadInfo
public WorldDownload requestDownloadInfo(long p_224917_1_, int p_224917_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
requestUploadInfo
@Nullable public UploadInfo requestUploadInfo(long p_224934_1_, @Nullable java.lang.String p_224934_3_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
rejectInvitation
public void rejectInvitation(java.lang.String p_224913_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
agreeToTos
public void agreeToTos() throws RealmsServiceException
- Throws:
RealmsServiceException
-
getNews
public RealmsNews getNews() throws RealmsServiceException
- Throws:
RealmsServiceException
-
sendPingResults
public void sendPingResults(PingResult p_224903_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
trialAvailable
public java.lang.Boolean trialAvailable() throws RealmsServiceException
- Throws:
RealmsServiceException
-
deleteWorld
public void deleteWorld(long p_224916_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
url
@Nullable private java.lang.String url(java.lang.String p_224926_1_)
-
url
@Nullable private java.lang.String url(java.lang.String p_224907_1_, @Nullable java.lang.String p_224907_2_)
-
execute
private java.lang.String execute(Request<?> p_224938_1_) throws RealmsServiceException
- Throws:
RealmsServiceException
-
-