@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
RealmsServiceException
public RealmsServer getOwnWorld(long worldId) throws RealmsServiceException
RealmsServiceException
public RealmsServerPlayerLists getLiveStats() throws RealmsServiceException
RealmsServiceException
public RealmsServerAddress join(long worldId) throws RealmsServiceException
RealmsServiceException
public void initializeWorld(long worldId, String name, String motd) throws RealmsServiceException
RealmsServiceException
public Boolean mcoEnabled() throws RealmsServiceException
RealmsServiceException
public Boolean stageAvailable() throws RealmsServiceException
RealmsServiceException
public RealmsClient.CompatibleVersionResponse clientCompatible() throws RealmsServiceException
RealmsServiceException
public void uninvite(long worldId, String profileUuid) throws RealmsServiceException
RealmsServiceException
public void uninviteMyselfFrom(long worldId) throws RealmsServiceException
RealmsServiceException
public RealmsServer invite(long worldId, String profileName) throws RealmsServiceException
RealmsServiceException
public BackupList backupsFor(long worldId) throws RealmsServiceException
RealmsServiceException
public void update(long worldId, String name, String motd) throws RealmsServiceException
RealmsServiceException
public void updateSlot(long worldId, int slot, RealmsWorldOptions options) throws RealmsServiceException
RealmsServiceException
public boolean switchSlot(long worldId, int slot) throws RealmsServiceException
RealmsServiceException
public void restoreWorld(long worldId, String backupId) throws RealmsServiceException
RealmsServiceException
public WorldTemplatePaginatedList fetchWorldTemplates(int page, int pageSize, RealmsServer.WorldType type) throws RealmsServiceException
RealmsServiceException
public Boolean putIntoMinigameMode(long worldId, String minigameId) throws RealmsServiceException
RealmsServiceException
public Ops op(long worldId, String profileUuid) throws RealmsServiceException
RealmsServiceException
public Ops deop(long worldId, String profileUuid) throws RealmsServiceException
RealmsServiceException
public Boolean open(long worldId) throws RealmsServiceException
RealmsServiceException
public Boolean close(long worldId) throws RealmsServiceException
RealmsServiceException
public Boolean resetWorldWithSeed(long worldId, String seed, Integer levelType, boolean generateStructures) throws RealmsServiceException
RealmsServiceException
public Boolean resetWorldWithTemplate(long worldId, String worldTemplateId) throws RealmsServiceException
RealmsServiceException
public Subscription subscriptionFor(long worldId) throws RealmsServiceException
RealmsServiceException
public int pendingInvitesCount() throws RealmsServiceException
RealmsServiceException
public PendingInvitesList pendingInvites() throws RealmsServiceException
RealmsServiceException
private boolean isOwnerBlocked(PendingInvite pendingInvite)
public void acceptInvitation(String invitationId) throws RealmsServiceException
RealmsServiceException
public WorldDownload download(long worldId, int slotId) throws RealmsServiceException
RealmsServiceException
@Nullable public UploadInfo upload(long worldId, @Nullable String token) throws RealmsServiceException
RealmsServiceException
public void rejectInvitation(String invitationId) throws RealmsServiceException
RealmsServiceException
public void agreeToTos() throws RealmsServiceException
RealmsServiceException
public RealmsNews getNews() throws RealmsServiceException
RealmsServiceException
public void sendPingResults(PingResult pingResult) throws RealmsServiceException
RealmsServiceException
public Boolean trialAvailable() throws RealmsServiceException
RealmsServiceException
public void deleteWorld(long worldId) throws RealmsServiceException
RealmsServiceException