add README.md

This commit is contained in:
TONY_All 2022-03-20 15:42:42 +08:00
parent ac880d1d91
commit 929a26f03d
1 changed files with 16 additions and 0 deletions

16
README.md Normal file
View File

@ -0,0 +1,16 @@
# 给屑颜的留言
该插件使用 PaperSpigot 在 1.18 中提供的 paperweight-userdev 工具包进行开发Gradle 任务 runServer 可用于直接在Idea内启动简易服务端用于插件测试。
## `cc.maxmc.sample.packet`
该部分为数据包拦截原理,我做的简易实现,实际开发过程中建议使用`ProtocolLib/TabooLib`等成熟数据包收发框架进行处理
## `cc.maxmc.sample.listener`
该部分为聊天信息截取在Paper中该数据包
`net.minecraft.network.protocol.game.ClientboundChatPacket#getMessage` 用于发送系统信息(主要为TranslateKey)
`net.minecraft.network.protocol.game.ClientboundChatPacket.adventure$message` 用于发送玩家聊天信息
`net.minecraft.network.protocol.game.ClientboundChatPacket.components` **可能**用于插件发送消息