File tree Expand file tree Collapse file tree 7 files changed +10
-11
lines changed
src/main/kotlin/tech/aliorpse/mcutils Expand file tree Collapse file tree 7 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ enum class SkinModel {
4343 * The JSON Element that to be processed.
4444 */
4545@JsonClass(generateAdapter = true )
46- data class RawPlayerProfile (
46+ internal data class RawPlayerProfile (
4747 val id : String ,
4848 val name : String ,
4949 val legacy : Boolean = false ,
@@ -54,14 +54,14 @@ data class RawPlayerProfile(
5454 * @property value Base64 string containing [DecodedTextures].
5555 */
5656 @JsonClass(generateAdapter = true )
57- data class Property (val name : String , val value : String )
57+ internal data class Property (val name : String , val value : String )
5858}
5959
6060/* *
6161 * Texture element decoded from [RawPlayerProfile.Property.value].
6262 */
6363@JsonClass(generateAdapter = true )
64- data class DecodedTextures (
64+ internal data class DecodedTextures (
6565 val timestamp : Long ,
6666 val profileId : String ,
6767 val profileName : String ,
@@ -72,7 +72,7 @@ data class DecodedTextures(
7272 * Data of the texture.
7373 */
7474@JsonClass(generateAdapter = true )
75- data class Texture (
75+ internal data class Texture (
7676 val url : String ,
7777 val metadata : Metadata ?
7878)
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import okio.ByteString.Companion.decodeBase64
88 * Custom adapter for converting RawPlayerProfile into a `PlayerProfile` object.
99 */
1010@Suppress(" unused" )
11- class PlayerProfileAdapter {
11+ internal class PlayerProfileAdapter {
1212 private val moshi = Moshi .Builder ().build()
1313
1414 @FromJson
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package tech.aliorpse.mcutils.model.player
33/* *
44 * This data class should not be used in your app. Only for internal use.
55 */
6- data class PlayerUUIDProfile (
6+ internal data class PlayerUUIDProfile (
77 val id : String ,
88 val name : String ,
99 val legacy : Boolean = false ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import tech.aliorpse.mcutils.modules.server.JavaServer.moshi
1111/* *
1212 * § codes or Hex strings Adapter.
1313 */
14- class ColorAdapter {
14+ internal class ColorAdapter {
1515 private val defaultAdapter by lazy { moshi.adapter(Color ::class .java) }
1616
1717 @FromJson
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import tech.aliorpse.mcutils.utils.MOTDParser.sectionToObj
1111/* *
1212 * Adapt different kinds of Description server sent. String or TextComponent.
1313 */
14- class DescriptionAdapter (
14+ internal class DescriptionAdapter (
1515 private val motdAdapter : MOTDTextComponentAdapter
1616) {
1717 private val defaultAdapter by lazy { moshi.adapter(Description ::class .java) }
@@ -38,7 +38,6 @@ class DescriptionAdapter(
3838 }
3939 }
4040
41-
4241 @ToJson
4342 fun toJson (writer : JsonWriter , value : Description ? ) {
4443 defaultAdapter.toJson(writer, value)
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import tech.aliorpse.mcutils.modules.server.JavaServer.moshi
99/* *
1010 * 有些傻逼服务器喜欢往 [MOTDTextComponent.text] 里面加§. mcutils不支持这种写法. §不会做处理.
1111 */
12- class MOTDTextComponentAdapter (
12+ internal class MOTDTextComponentAdapter (
1313 private val colorAdapter : ColorAdapter
1414) {
1515 private val defaultAdapter by lazy { moshi.adapter(MOTDTextComponent ::class .java) }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import retrofit2.http.Path
55import tech.aliorpse.mcutils.model.player.PlayerProfile
66import tech.aliorpse.mcutils.model.player.PlayerUUIDProfile
77
8- interface PlayerService {
8+ internal interface PlayerService {
99 /* *
1010 * Retrieves the player's profile from the Mojang session server using their UUID.
1111 *
You can’t perform that action at this time.
0 commit comments