Greetings, I am little stuck. How would I check if the player has typed something? Packets? Sorry I am a little unsure Regards, ZP
When a player talks, save the state into a database... (GIGO: you explain little about what you want, I will explain little too about what I know)
PHP: use pocketmine\event\player\PlayerChatEvent;Public function onChat(PlayerChatEvent $event) { // Code to be executed}
The PlayerChatEvent is fired when a player types something. If you mean you want to check if the event is not cancelled then that would be: PHP: if($event->isCancelled() !== false) Otherwise im not sure what you mean.
So lets say, if a player types something in a period of time, they wont receive the affects, however, if they don't, they will. ( I am really confused how to set it out)
Just check if the player talks during this period. Im not sure how u have the "period" setup but it wwould look something like this: PHP: public function onChat(PlayerChatEvent $event) {if($periodIsEnabled) { // code to be excecuted if they talk during the period }} Thats all.
@Hotshot_9930 it is a private plugin it is basically a quiz-type plugin. The concept is that, when the player correctly answers the question, they receive special effects and rewards