@Environment(value=CLIENT) public class RealmsClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RealmsClient.CompatibleVersionResponse |
static class |
RealmsClient.Environment |
| Modifier and Type | Field and Description |
|---|---|
private MinecraftClient |
client |
static RealmsClient.Environment |
currentEnvironment |
private static boolean |
initialized |
private static CheckedGson |
JSON |
private static Logger |
LOGGER |
private String |
sessionId |
private String |
username |
| Constructor and Description |
|---|
RealmsClient(String sessionId,
String username,
MinecraftClient client) |
public static RealmsClient.Environment currentEnvironment
private static boolean initialized
private static final Logger LOGGER
private static final CheckedGson JSON
private final String sessionId
private final String username
private final MinecraftClient client
public RealmsClient(String sessionId, String username, MinecraftClient client)
public static RealmsClient createRealmsClient()
public static void switchToStage()
public static void switchToProd()
public static void switchToLocal()
public RealmsServerList listWorlds() throws RealmsServiceException
RealmsServiceExceptionpublic RealmsServer getOwnWorld(long worldId) throws RealmsServiceException
RealmsServiceExceptionpublic RealmsServerPlayerLists getLiveStats() throws RealmsServiceException
RealmsServiceExceptionpublic RealmsServerAddress join(long worldId) throws RealmsServiceException
RealmsServiceExceptionpublic void initializeWorld(long worldId,
String name,
String motd)
throws RealmsServiceException
RealmsServiceExceptionpublic Boolean mcoEnabled() throws RealmsServiceException
RealmsServiceExceptionpublic Boolean stageAvailable() throws RealmsServiceException
RealmsServiceExceptionpublic RealmsClient.CompatibleVersionResponse clientCompatible() throws RealmsServiceException
RealmsServiceExceptionpublic void uninvite(long worldId,
String profileUuid)
throws RealmsServiceException
RealmsServiceExceptionpublic void uninviteMyselfFrom(long worldId)
throws RealmsServiceException
RealmsServiceExceptionpublic RealmsServer invite(long worldId, String profileName) throws RealmsServiceException
RealmsServiceExceptionpublic BackupList backupsFor(long worldId) throws RealmsServiceException
RealmsServiceExceptionpublic void update(long worldId,
String name,
String motd)
throws RealmsServiceException
RealmsServiceExceptionpublic void updateSlot(long worldId,
int slot,
RealmsWorldOptions options)
throws RealmsServiceException
RealmsServiceExceptionpublic boolean switchSlot(long worldId,
int slot)
throws RealmsServiceException
RealmsServiceExceptionpublic void restoreWorld(long worldId,
String backupId)
throws RealmsServiceException
RealmsServiceExceptionpublic WorldTemplatePaginatedList fetchWorldTemplates(int page, int pageSize, RealmsServer.WorldType type) throws RealmsServiceException
RealmsServiceExceptionpublic Boolean putIntoMinigameMode(long worldId, String minigameId) throws RealmsServiceException
RealmsServiceExceptionpublic Ops op(long worldId, String profileUuid) throws RealmsServiceException
RealmsServiceExceptionpublic Ops deop(long worldId, String profileUuid) throws RealmsServiceException
RealmsServiceExceptionpublic Boolean open(long worldId) throws RealmsServiceException
RealmsServiceExceptionpublic Boolean close(long worldId) throws RealmsServiceException
RealmsServiceExceptionpublic Boolean resetWorldWithSeed(long worldId, String seed, Integer levelType, boolean generateStructures) throws RealmsServiceException
RealmsServiceExceptionpublic Boolean resetWorldWithTemplate(long worldId, String worldTemplateId) throws RealmsServiceException
RealmsServiceExceptionpublic Subscription subscriptionFor(long worldId) throws RealmsServiceException
RealmsServiceExceptionpublic int pendingInvitesCount()
throws RealmsServiceException
RealmsServiceExceptionpublic PendingInvitesList pendingInvites() throws RealmsServiceException
RealmsServiceExceptionprivate boolean isOwnerBlocked(PendingInvite pendingInvite)
public void acceptInvitation(String invitationId) throws RealmsServiceException
RealmsServiceExceptionpublic WorldDownload download(long worldId, int slotId) throws RealmsServiceException
RealmsServiceException@Nullable public UploadInfo upload(long worldId, @Nullable String token) throws RealmsServiceException
RealmsServiceExceptionpublic void rejectInvitation(String invitationId) throws RealmsServiceException
RealmsServiceExceptionpublic void agreeToTos()
throws RealmsServiceException
RealmsServiceExceptionpublic RealmsNews getNews() throws RealmsServiceException
RealmsServiceExceptionpublic void sendPingResults(PingResult pingResult) throws RealmsServiceException
RealmsServiceExceptionpublic Boolean trialAvailable() throws RealmsServiceException
RealmsServiceExceptionpublic void deleteWorld(long worldId)
throws RealmsServiceException
RealmsServiceException