Chat API related thing
NikkyAI opened this issue ยท 4 comments
I need the following chat related things:
- player sent chat message (Mixin:
Lnet/minecraft/server/network/ServerPlayNetworkHandler;onChatMessage(Lnet/minecraft/server/network/packet/ChatMessageServerPacket;)V
) - a way to detect
/say
usage
sending chat messages works via getting a instance of MinecraftDedicatedServer
which gives the DedicatedPlayerManager
but would it be possible to get that server instance from FabricAPI too ?
or maybe through the loader.. it is getting constructed before the mods are loaded
so it could be passed in onInitializeServer
i encountered mods replacing commands on forge..
one of them being conventional-chat
so i needed to listen to which commands were executed and if they were using /say
i can mixin to CommandSay, i just don't think it will be enough long term
In that case, it would be best to Mixin to whatever method receives data to put into the chat.