iTXTech / Genisys

Feature-rich server software for Minecraft: Pocket Edition & Windows 10 Edition Beta
https://itxtech.org/genisys/
GNU General Public License v3.0
435 stars 243 forks source link

Enhancement: option for broadcast when players change their gamemode #607

Closed SleepSpace9 closed 8 years ago

SleepSpace9 commented 8 years ago

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.

PeratX commented 8 years ago

You can listen to PlayerTextPreSendEvent

SleepSpace9 commented 8 years ago

This should work with "/defaultgamemode" command, because sendmessage() is used, but the common "/gamemode" or "/gm" uses Command::broadcastCommandMessage. Maybe this is also cancellable?

SleepSpace9 commented 8 years ago

Sorry, my fault - broadcastCommandMessage also uses sendMessage(). :smile:

Thanks for your tip! I'll try to add this to CustomAlerts-Plugin.