<commit_before><?php

namespace MyChat;

use pocketmine\event\player\PlayerChatEvent;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\event\player\PlayerQuitEvent;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\TextFormat;

class Loader extends PluginBase implements Listener{

    public function onEnable(){
    	$this->saveDefaultConfig();
    	if($this->getConfig()->get("version") === $this->getDescription()->getVersion()){
    	    $this->getServer()->getPluginManager()->registerEvents($this, $this);
            $this->getLogger()->info(TextFormat::GREEN."Enabling ".$this->getDescription()->getFullName()."...");
    	}
    	else{
    	    $this->getLogger()->info(TextFormat::YELLOW."Your configuration file is outdated.");
    	    $this->getPluginLoader()->disablePlugin($this);
    	}
    }
    
    public function onDisable(){
        $this->getLogger()->info(TextFormat::RED."Disabling ".$this->getDescription()->getFullName()."...");
    }
    
    public function onPlayerChat(PlayerChatEvent $event){
        $event->setFormat(str_replace(
            ["{ip}",
            "{level}", 
            "{message}", 
            "{player}",
            "{port}"], 
            [$event->getPlayer()->getAddress(), 
            $event->getPlayer()->getLevel()->getName(), 
            $event->getMessage(), 
            $event->getPlayer()->getName(), 
            $event->getPlayer()->getPort()], 
            $this->getConfig()->get("format")));
    }
    
    public function onPlayerJoin(PlayerJoinEvent $event){
        if($this->getConfig()->get("mute-join-message") === true){
            $event->setJoinMessage(null);
        }
    }
    
    public function onPlayerQuit(PlayerQuitEvent $event){
        if($this->getConfig()->get("mute-quit-message") === true){
            $event->setQuitMessage(null);
        }
    }
}<commit_msg>Update Loader.php<commit_after><?php

namespace MyChat;

use pocketmine\event\player\PlayerChatEvent;
use pocketmine\event\player\PlayerDeathEvent;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\event\player\PlayerQuitEvent;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\TextFormat;

class Loader extends PluginBase implements Listener{

    public function onEnable(){
    	$this->saveDefaultConfig();
    	if($this->getConfig()->get("version") === $this->getDescription()->getVersion()){
    	    $this->getServer()->getPluginManager()->registerEvents($this, $this);
            $this->getLogger()->info(TextFormat::GREEN."Enabling ".$this->getDescription()->getFullName()."...");
    	}
    	else{
    	    $this->getLogger()->info(TextFormat::YELLOW."Your configuration file is outdated.");
    	    $this->getPluginLoader()->disablePlugin($this);
    	}
    }
    
    public function onDisable(){
        $this->getLogger()->info(TextFormat::RED."Disabling ".$this->getDescription()->getFullName()."...");
    }
    
    public function onPlayerChat(PlayerChatEvent $event){
        $event->setFormat(str_replace(
            ["{ip}",
            "{level}", 
            "{message}", 
            "{player}",
            "{port}"], 
            [$event->getPlayer()->getAddress(), 
            $event->getPlayer()->getLevel()->getName(), 
            $event->getMessage(), 
            $event->getPlayer()->getName(), 
            $event->getPlayer()->getPort()], 
            $this->getConfig()->get("format")));
    }
    
    public function onPlayerDeath(PlayerDeathEvent $event){
        if($this->getConfig()->get("enable")["mute"]["player-death-message"] === true){
            $event->setDeathMessage(null);
        }
    }
    public function onPlayerJoin(PlayerJoinEvent $event){
        if($this->getConfig()->get("enable")["mute"]["player-join-message"] === true){
            $event->setJoinMessage(null);
        }
    }
    
    public function onPlayerQuit(PlayerQuitEvent $event){
        if($this->getConfig()->get("enable")["mute"]["player-quit-message"] === true){
            $event->setQuitMessage(null);
        }
    }
}
{'fraction_non_alphanumeric': 0.18155268921878803, 'fraction_numerical': 0.0, 'mean_word_length': 2.903133903133903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 84, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3598976', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1159, 'n_words': 156}