byte buffer: remove deprecated legacy json read functions

This commit is contained in:
Bixilon 2021-07-27 20:39:25 +02:00
parent 0f93956c5e
commit 25191ecb9d
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -12,8 +12,6 @@
*/
package de.bixilon.minosoft.protocol.protocol
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import de.bixilon.minosoft.data.commands.CommandArgumentNode
import de.bixilon.minosoft.data.commands.CommandLiteralNode
import de.bixilon.minosoft.data.commands.CommandNode
@ -256,16 +254,6 @@ open class InByteBuffer {
return readArray(length) { readJson() }
}
@Deprecated(message = "GSON is deprecated")
fun readLegacyJson(): JsonObject {
return JsonParser.parseString(readString()).asJsonObject
}
@Deprecated(message = "GSON is deprecated")
fun readLegacyJsonArray(length: Int = readVarInt()): Array<JsonObject> {
return readArray(length) { readLegacyJson() }
}
open fun readChatComponent(): ChatComponent {
return ChatComponent.of(readString())
}