PHP: public function onChat(PlayerChatEvent $ev){ $p = $ev->getPlayer(); $badwords = array("fys"); $msg = explode(" ",$ev->getMessage()); foreach($msg as $word){ foreach($badwords as $m){ if(strtolower($word) === $m){ $p->getServer()->broadcastMessage("§e-§cStop that swearing§a ".$p->getName()); } if player player says $badwords again, the plugin will mute him for 5 minutes. how do you do that? Im bad at timing code
idk?neven u tell me learn php idek im learning by looking code so can you copy the code up there and paste and recode it with 5 min mute and ill do the other maybe?
I think using time() is better, since you are checking whether something has expired when something hapepns.
can you copy the code above and recode it with time()? i wanna see how it works, I cant learn looking pm docs or that php.net I can learn by looking examples, well yeah some site that teaches php do examples but its different to PM so idek