Package-level declarations

Types

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class BedrockServerStatus(val description: Description, val players: Players, val version: Version, val ping: Long, val levelName: String, val gameMode: GameMode, val serverUniqueID: String) : ServerStatus

Represents the status of a Minecraft Bedrock server.

Link copied to clipboard
class BedrockServerStatusJsonAdapter(moshi: Moshi) : JsonAdapter<BedrockServerStatus>
Link copied to clipboard
sealed interface Color

Represents a color in Minecraft.

Link copied to clipboard

§ codes or Hex strings Adapter.

Link copied to clipboard
data class Description(val text: String, val obj: MOTDTextComponent)

Server description structure, typically the MOTD text.

Link copied to clipboard

Adapt different kinds of Description server sent. String or TextComponent.

Link copied to clipboard
Link copied to clipboard
@JsonClass(generateAdapter = true)
data class JavaServerStatus(val description: Description, val players: Players, val version: Version, val ping: Long, val enforcesSecureChat: Boolean = false, val favicon: String?) : ServerStatus

Represents the status of a Java Edition Minecraft server.

Link copied to clipboard
class JavaServerStatusJsonAdapter(moshi: Moshi) : JsonAdapter<JavaServerStatus>
Link copied to clipboard
data class MOTDTextComponent(val text: String, val color: Color? = Color.Named.WHITE, val bold: Boolean = false, val italic: Boolean = false, val underlined: Boolean = false, val strikethrough: Boolean = false, val obfuscated: Boolean = false, val extra: List<MOTDTextComponent>? = emptyList())

Represents a component of the MOTD.

Link copied to clipboard

有些傻逼服务器喜欢往 MOTDTextComponent.text 里面加§. mcutils不支持这种写法. §不会做处理.

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class Players(val max: Int, val online: Int, val sample: List<Sample>)

Players in server information.

Link copied to clipboard
class PlayersJsonAdapter(moshi: Moshi) : JsonAdapter<Players>
Link copied to clipboard
@JsonClass(generateAdapter = true)
data class Sample(val id: String, val name: String)

Sample player information representing some online players.

Link copied to clipboard
class SampleJsonAdapter(moshi: Moshi) : JsonAdapter<Sample>
Link copied to clipboard
sealed class ServerStatus

Represents the status of a server.

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class Version(val name: String, val protocol: Int)

Server version information.

Link copied to clipboard
class VersionJsonAdapter(moshi: Moshi) : JsonAdapter<Version>

Properties

Link copied to clipboard
val colorToOriginalCode: <Error class: unknown class>

Map from name to code in Minecraft.