Closed SleepSpace9 closed 8 years ago
You can listen to PlayerTextPreSendEvent
This should work with "/defaultgamemode" command, because sendmessage() is used, but the common "/gamemode" or "/gm" uses Command::broadcastCommandMessage. Maybe this is also cancellable?
Sorry, my fault - broadcastCommandMessage also uses sendMessage(). :smile:
Thanks for your tip! I'll try to add this to CustomAlerts-Plugin.
It would be nice to get an option in genisys.yml to disable broadcast when players change their gamemode, because you can't disable it by plugin (if this information is right -> https://forums.pocketmine.net/threads/hide-gamemode-switch-message.13584/) and it spams the chat window. Maybe you can implement it too.