Hello Is there any way to prevent chatting in a specific world? Not only writing but even messages sent by players from other worlds.
Yes, there is. You might want to look in some chat mute plugins that already do this, although not per world. Basically do the same as here https://github.com/survanetwork/Bad...urva/badwordblocker/EventListener.php#L68-L77 just with a world check in place. Should look like: PHP: <?php/** * @author robske_110 * @license GPLv3 */class SomeClass implements Listener{ /** @var array */ public $chatDisabledLevelNames = []; public function onPlayerChat(PlayerChatEvent $event){ $player = $event->getPlayer(); if(in_array($player->getLevel()->getName(), $this->chatDisabledLevelNames)){ $event->setCancelled(); } $recipients = $event->getRecipients(); foreach($recipients as $id => $recipient){ if(in_array($recipient->getLevel()->getName(), $this->chatDisabledLevelNames)){ unset($recipients[$id]); } } $event->setRecipients($recipients); }}