mirror of
https://github.com/jie65535/mirai-console-jms-plugin.git
synced 2025-07-28 18:59:15 +08:00
更新到v0.1.1
修复 未查询到数据时提示异常问题 修复 获取玩家头像未显示双层皮肤问题
This commit is contained in:
parent
5113868a79
commit
1902e922a3
@ -3,11 +3,11 @@ plugins {
|
||||
kotlin("jvm") version kotlinVersion
|
||||
kotlin("plugin.serialization") version kotlinVersion
|
||||
|
||||
id("net.mamoe.mirai-console") version "2.9.2"
|
||||
id("net.mamoe.mirai-console") version "2.10.0"
|
||||
}
|
||||
|
||||
group = "top.jie65535"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
|
||||
repositories {
|
||||
maven("https://maven.aliyun.com/repository/public")
|
||||
|
@ -76,8 +76,17 @@ object JMSCommand : CompositeCommand(
|
||||
}
|
||||
|
||||
private suspend fun CommandSender.sendImage(data: ByteArray) {
|
||||
data.toExternalResource().use {
|
||||
subject?.sendImage(it)
|
||||
try {
|
||||
if (data.isEmpty()) {
|
||||
subject?.sendMessage("未查询到数据")
|
||||
return
|
||||
}
|
||||
|
||||
data.toExternalResource().use {
|
||||
subject?.sendImage(it)
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
subject?.sendMessage(String(data))
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ object JMinecraftSkin : KotlinPlugin(
|
||||
JvmPluginDescription(
|
||||
id = "top.jie65535.mirai-console-jms-plugin",
|
||||
name = "J Minecraft Skin",
|
||||
version = "0.1.0",
|
||||
version = "0.1.1",
|
||||
) {
|
||||
author("jie65535")
|
||||
info("MC皮肤查询插件")
|
||||
|
@ -11,7 +11,7 @@ object MinecraftSkinService {
|
||||
* 获取头像
|
||||
*/
|
||||
fun getAvatars(uuid: String)
|
||||
= HttpUtil.get("https://crafatar.com/avatars/$uuid")
|
||||
= HttpUtil.get("https://crafatar.com/avatars/$uuid?overlay")
|
||||
|
||||
/**
|
||||
* 获取玩家头模型渲染图
|
||||
|
Loading…
Reference in New Issue
Block a user