How do I count the chat messages from all players? Can anyone give me an example? PHP: public function onChat(PlayerChatEvent $event) { $player = $event->getPlayer(); if($event->getMessage()){ $config = new Config($this->folder . "config.yml", Config::YAML); $chat = $config->get("Chatnachrichten"); $gchat = (Int) $chat + 1; $config->get("Chatnachrichten", $gchat); $config->save(); } }
Just replace get with set on that line and you're set (pun intended). Und: Bitte. Versuch. Nachzudenken. Und verwende Englisch in deiner Datenbank. ENG, so mods don't complain: Please. Try to. Think. And use English in your database.