So I need to know if a player has his chat open, I found a function that returns true if the chat is opened, but I dont know how to use it. The function is:
func_146241_e || getChatOpen || Returns true if the chat GUI is open.
Also I found it on the deobfuscated minecraft code:
private boolean getChatOpen() { return this.mc.currentScreen instanceof ChatScreen; }
It is part of the NewChatGui.java class, inside the screen folder, inside the gui folder.
Im using mc 1.16.5, specifically using cnpcs mod to create some good stuff. Thx in advance.