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 classRealmsClient.CompatibleVersionResponsestatic classRealmsClient.Environment
-
Field Summary
Fields Modifier and Type Field Description static RealmsClient.EnvironmentcurrentEnvironmentprivate static PersistenceSerializerGSONprivate static booleaninitializedprivate static org.apache.logging.log4j.LoggerLOGGERprivate Minecraftminecraftprivate java.lang.StringsessionIdprivate java.lang.Stringusername
-
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 voidacceptInvitation(java.lang.String p_224901_1_)voidagreeToTos()BackupListbackupsFor(long p_224923_1_)RealmsClient.CompatibleVersionResponseclientCompatible()java.lang.Booleanclose(long p_224932_1_)static RealmsClientcreate()voiddeleteWorld(long p_224916_1_)Opsdeop(long p_224929_1_, java.lang.String p_224929_3_)private java.lang.Stringexecute(Request<?> p_224938_1_)WorldTemplatePaginatedListfetchWorldTemplates(int p_224930_1_, int p_224930_2_, RealmsServer.ServerType p_224930_3_)RealmsServerPlayerListsgetLiveStats()RealmsNewsgetNews()RealmsServergetOwnWorld(long p_224935_1_)voidinitializeWorld(long p_224900_1_, java.lang.String p_224900_3_, java.lang.String p_224900_4_)RealmsServerinvite(long p_224910_1_, java.lang.String p_224910_3_)private booleanisBlocked(PendingInvite p_244733_1_)RealmsServerAddressjoin(long p_224904_1_)RealmsServerListlistWorlds()java.lang.BooleanmcoEnabled()Opsop(long p_224906_1_, java.lang.String p_224906_3_)java.lang.Booleanopen(long p_224942_1_)PendingInvitesListpendingInvites()intpendingInvitesCount()java.lang.BooleanputIntoMinigameMode(long p_224905_1_, java.lang.String p_224905_3_)voidrejectInvitation(java.lang.String p_224913_1_)WorldDownloadrequestDownloadInfo(long p_224917_1_, int p_224917_3_)UploadInforequestUploadInfo(long p_224934_1_, java.lang.String p_224934_3_)java.lang.BooleanresetWorldWithSeed(long p_224943_1_, java.lang.String p_224943_3_, java.lang.Integer p_224943_4_, boolean p_224943_5_)java.lang.BooleanresetWorldWithTemplate(long p_224924_1_, java.lang.String p_224924_3_)voidrestoreWorld(long p_224928_1_, java.lang.String p_224928_3_)voidsendPingResults(PingResult p_224903_1_)java.lang.BooleanstageAvailable()SubscriptionsubscriptionFor(long p_224933_1_)booleanswitchSlot(long p_224927_1_, int p_224927_3_)static voidswitchToLocal()static voidswitchToProd()static voidswitchToStage()java.lang.BooleantrialAvailable()voiduninvite(long p_224908_1_, java.lang.String p_224908_3_)voiduninviteMyselfFrom(long p_224912_1_)voidupdate(long p_224922_1_, java.lang.String p_224922_3_, java.lang.String p_224922_4_)voidupdateSlot(long p_224925_1_, int p_224925_3_, RealmsWorldOptions p_224925_4_)private java.lang.Stringurl(java.lang.String p_224926_1_)private java.lang.Stringurl(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
-
-