remove unknown player properties warning

This commit is contained in:
Bixilon 2023-02-04 18:56:28 +01:00
parent 6f0618b1c6
commit 274173349e
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 1 additions and 7 deletions

View File

@ -19,9 +19,6 @@ import de.bixilon.kutil.string.StringUtil.formatPlaceholder
import de.bixilon.kutil.uuid.UUIDUtil.trim
import de.bixilon.minosoft.assets.util.InputStreamUtil.readJsonObject
import de.bixilon.minosoft.data.entities.entities.player.properties.textures.PlayerTextures
import de.bixilon.minosoft.util.logging.Log
import de.bixilon.minosoft.util.logging.LogLevels
import de.bixilon.minosoft.util.logging.LogMessageType
import java.net.URL
import java.util.*
@ -43,9 +40,8 @@ data class PlayerProperties(
data["properties"]?.toJsonList()?.let {
for (property in it) {
check(property is Map<*, *>)
when (val name = property["name"]) {
when (property["name"]) {
TEXTURE_PROPERTIES -> textures = PlayerTextures.of(property["value"].toString(), property["signature"]?.toString() ?: throw IllegalArgumentException("Texture data must be signed"))
else -> Log.log(LogMessageType.OTHER, LogLevels.WARN) { "Unknown player property $name: ${property["value"].toString()}" }
}
}
}

View File

@ -224,8 +224,6 @@ class PlayInByteBuffer : InByteBuffer {
}
textures = PlayerTextures.of(value, signature)
}
else -> Log.log(LogMessageType.NETWORK_PACKETS_IN, LogLevels.WARN) { "Unknown player property $name: $value" }
}
}
return PlayerProperties(