mirror of
https://github.com/jie65535/mirai-console-jms-plugin.git
synced 2025-08-04 19:09: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("jvm") version kotlinVersion
|
||||||
kotlin("plugin.serialization") 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"
|
group = "top.jie65535"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://maven.aliyun.com/repository/public")
|
maven("https://maven.aliyun.com/repository/public")
|
||||||
|
@ -76,8 +76,17 @@ object JMSCommand : CompositeCommand(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun CommandSender.sendImage(data: ByteArray) {
|
private suspend fun CommandSender.sendImage(data: ByteArray) {
|
||||||
data.toExternalResource().use {
|
try {
|
||||||
subject?.sendImage(it)
|
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(
|
JvmPluginDescription(
|
||||||
id = "top.jie65535.mirai-console-jms-plugin",
|
id = "top.jie65535.mirai-console-jms-plugin",
|
||||||
name = "J Minecraft Skin",
|
name = "J Minecraft Skin",
|
||||||
version = "0.1.0",
|
version = "0.1.1",
|
||||||
) {
|
) {
|
||||||
author("jie65535")
|
author("jie65535")
|
||||||
info("MC皮肤查询插件")
|
info("MC皮肤查询插件")
|
||||||
|
@ -11,7 +11,7 @@ object MinecraftSkinService {
|
|||||||
* 获取头像
|
* 获取头像
|
||||||
*/
|
*/
|
||||||
fun getAvatars(uuid: String)
|
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