Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[问题] 使用ItemsAdder的::占位符显示image时抛出异常。 #420

Open
3 tasks done
killertuling opened this issue Jul 22, 2024 · 1 comment
Open
3 tasks done
Labels
Bug | 漏洞 需要修复的错误

Comments

@killertuling
Copy link

是否已尝试最新的版本

  • 我已更新 TrChat 至最新的版本, 并且同样复现该问题.

是否已查阅 Wiki

  • 我已查阅 Wiki 对于该问题的相关内容, 并确定该问题是存在的.

如果使用跨服功能, 是否在代理端上安装了TrChat或使用redis转发?

  • 我已在代理端上安装了TrChat或使用redis转发

详细描述

在聊天栏发出
这是一条消息 :emj_ku:
同时确保存在 :emj_ku: 的image。

配置文件

Options:
  Target: ALL
  Proxy: true
  Force-Proxy: true
  Double-Transfer: false
  Auto-Join: true

Formats:
  - condition: ~
    priority: 100
    msg:
      default-color: '&7'
      hover: '&8发送时间: %server_time_HH:mm:ss%'
    prefix:
      part-before-player:
        text: '&f%changeoutput_equals_input:{mythicprefixes_chat}_matcher:_ifmatch:&f_else:{mythicprefixes_chat}% '
        hover: |-
          &8打开聊天管理菜单
        command: '/chat'
        # suggest: '/msg %player_name% '
      player:
        - text: '&x&d&0&f&b&f&8%javascript_NickName%'
          hover: |-
            &8查看 &7%player_name% &8的个人档案
          command: '/profiles %player_name%'
          # suggest: '/msg %player_name% '
      part-before-msg:
        text: '&7: '
    # suffix:
    #   example:
    #     text: ''

# Can't use placeholders!
Console:
  - prefix:
      server:
        text: '&eServer&8: '
    msg:
      default-color: 'l'

日志

"> java.lang.IllegalStateException: Got an error translating component!Please report!
at me.arasple.mc.trchat.api.nms.NMSImpl.craftChatMessageFromComponent(NMSImpl.kt:47)
at me.arasple.mc.trchat.api.nms.NMSImpl.sendMessage(NMSImpl.kt:70)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.api.impl.BukkitComponentManager.sendComponent(BukkitComponentManager.kt:73)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.util.BukkitUtilKt.sendComponent(BukkitUtil.kt:74)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.module.internal.proxy.BukkitProxyProcessor.execute(BukkitProxyProcessor.kt:97)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.module.internal.proxy.BukkitProxyProcessor$RedisSide.execute(BukkitProxyProcessor.kt:270)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.module.internal.proxy.redis.RedisManager$init$1.invoke(RedisManager.kt:46)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.module.internal.proxy.redis.RedisManager$init$1.invoke(RedisManager.kt:44)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.taboolib.expansion.SingleRedisConnection$createPubSub$1.onMessage(SingleRedisConnection.kt:184)
at TrChat-2.1.0.jar//redis.clients.jedis_4_2_3.JedisPubSub.process(JedisPubSub.java:156)
at TrChat-2.1.0.jar//redis.clients.jedis_4_2_3.JedisPubSub.proceed(JedisPubSub.java:125)
at TrChat-2.1.0.jar//redis.clients.jedis_4_2_3.Jedis.subscribe(Jedis.java:7891)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.taboolib.expansion.SingleRedisConnection$subscribe$1$1.invoke(SingleRedisConnection.kt:160)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.taboolib.expansion.SingleRedisConnection$subscribe$1$1.invoke(SingleRedisConnection.kt:156)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.taboolib.expansion.SingleRedisConnection.exec(SingleRedisConnection.kt:40)
at TrChat-2.1.0.jar//me.arasple.mc.trchat.taboolib.expansion.SingleRedisConnection.subscribe$lambda$2(SingleRedisConnection.kt:156)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: com.google.gson.JsonParseException: Invalid color name: reset
at net.minecraft.SystemUtils.a(SystemUtils.java:863)
at net.minecraft.network.chat.IChatBaseComponent$ChatSerializer.b(IChatBaseComponent.java:291)
at net.minecraft.network.chat.IChatBaseComponent$ChatSerializer.a(IChatBaseComponent.java:310)
at org.bukkit.craftbukkit.v1_20_R3.util.CraftChatMessage.fromJSON(CraftChatMessage.java:216)
at me.arasple.mc.trchat.api.nms.NMSImpl.craftChatMessageFromComponent(NMSImpl.kt:40)
... 20 more"

服务器环境

服务器版本:
image

@killertuling killertuling added the Bug | 漏洞 需要修复的错误 label Jul 22, 2024
@killertuling killertuling changed the title [问题] 在聊天栏使用ItemsAdder的::占位符显示image时抛出异常。 [问题] 使用ItemsAdder的::占位符显示image时抛出异常。 Jul 22, 2024
@MCZQ
Copy link

MCZQ commented Aug 6, 2024

我也有同样的问题,为什么OP可以正常,普通玩家就不能发表情呢,请问您找到解决办法了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug | 漏洞 需要修复的错误
Projects
None yet
Development

No branches or pull requests

2 participants