Overwrite987 / UltimateServerProtector

Incredibly lightweight plugin, that add an "admin-password" to your server.
GNU Affero General Public License v3.0
14 stars 7 forks source link

Fix players sending empty messages when admin is logging in #25

Closed imDaniX closed 8 months ago

imDaniX commented 8 months ago

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.