Found out an issue when I was looking through a code - ChatListener#onChat doesn't check who sent a message when clearing it. Tested it, and chat indeed doesn't work.
As I was there, I've also cleaned up some logic. e.g. useless isEmpty check and inconsistent usage of api.isCaptured. Also, e.setCancelled(false) may break third-party plugins logic, so I've just moved things around to avoid it.
Found out an issue when I was looking through a code -
ChatListener#onChat
doesn't check who sent a message when clearing it. Tested it, and chat indeed doesn't work.As I was there, I've also cleaned up some logic. e.g. useless
isEmpty
check and inconsistent usage ofapi.isCaptured
. Also,e.setCancelled(false)
may break third-party plugins logic, so I've just moved things around to avoid it.