<commit_before><?php

namespace iManager;

use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\player\PlayerChatEvent;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\Config;
use pocketmine\utils\TextFormat;

class Loader extends PluginBase implements Listener{
    
    public $chat;
    
    public $exempt;
    
    public function onEnable(){
        @mkdir($this->getDataFolder());
        $this->chat = new Config($this->getDataFolder()."chat.txt", Config::ENUM);
        $this->exempt = new Config($this->getDataFolder()."exempt.txt", Config::ENUM);
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
	$this->getLogger()->info(TextFormat::GREEN."iManager enabled.");
    }
    
    public function onDisable(){
    	$this->chat->save();
        $this->exempt->save();
        $this->getLogger()->info(TextFormat::RED."iManager disabled.");
    }
    
    public function onCommand(CommandSender $sender, Command $command, $label, array $args){
    	if(strtolower($command->getName()) === "addresslist"){
    	    $sender->sendMessage(TextFormat::YELLOW."IP address and port of all players that are currently online:");
    	    foreach($sender->getServer()->getOnlinePlayers() as $players){  
    	    	$sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::RED.$players->getAddress().TextFormat::BLUE.":".TextFormat::GREEN.$players->getPort());
                return true;
    	    }	
    	}
    	if(strtolower($command->getName()) === "disable"){
    	    if(isset($args[0])){
    	    	$target = $sender->getServer()->getPluginManager()->disablePlugin($args[0]);
    	    	$sender->sendMessage("Disabled ".$target->getName().".");
    	    }
    	    else{
    	    	$sender->sendMessage(TextFormat::RED."Invalid plugin name, check the name case.");
    	    }
    	}
    	if(strtolower($command->getName()) === "enable"){
    	    if(isset($args[0])){
    	    	$target = $sender->getServer()->getPluginManager()->enablePlugin($args[0]);
    	    	$sender->sendMessage("Enabled ".$target->getName().".");
    	    }
    	    else{
    	    	$sender->sendMessage(TextFormat::RED."Invalid plugin name, check the name case.");
    	    }
    	}
    	if(strtolower($command->getName()) === "gamemodelist"){
    	    $sender->sendMessage(TextFormat::YELLOW."Gamemode of all players that are currently online:");
            foreach($sender->getServer()->getOnlinePlayers() as $players){
                if($players->isAdventure()){
                    $sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::LIGHT_PURPLE."2");
                    return true;
                }
                elseif($players->isCreative()){
                    $sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::GREEN."1");
                    return true;
                }
                elseif($players->isSurvival()){
                    $sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::BLUE."0");
                    return true;
                }
                else{
                    $sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::RED."?");<commit_msg>Update Loader.php<commit_after><?php

namespace iManager;

use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\player\PlayerChatEvent;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\Config;
use pocketmine\utils\TextFormat;

class Loader extends PluginBase implements Listener{
    
    public $chat;
    
    public $exempt;
    
    public function onEnable(){
        @mkdir($this->getDataFolder());
        $this->chat = new Config($this->getDataFolder()."chat.txt", Config::ENUM);
        $this->exempt = new Config($this->getDataFolder()."exempt.txt", Config::ENUM);
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
	$this->getLogger()->info(TextFormat::GREEN."iManager enabled.");
    }
    
    public function onDisable(){
    	$this->chat->save();
        $this->exempt->save();
        $this->getLogger()->info(TextFormat::RED."iManager disabled.");
    }
    
    public function onCommand(CommandSender $sender, Command $command, $label, array $args){
    	if(strtolower($command->getName()) === "addresslist"){
    	    $sender->sendMessage(TextFormat::YELLOW."IP address and port of all players that are currently online:");
    	    foreach($sender->getServer()->getOnlinePlayers() as $players){  
    	    	$sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::RED.$players->getAddress().TextFormat::BLUE.":".TextFormat::GREEN.$players->getPort());
                return true;
    	    }	
    	}
    	if(strtolower($command->getName()) === "gamemodelist"){
    	    $sender->sendMessage(TextFormat::YELLOW."Gamemode of all players that are currently online:");
            foreach($sender->getServer()->getOnlinePlayers() as $players){
                if($players->isAdventure()){
                    $sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::LIGHT_PURPLE."2");
                    return true;
                }
                elseif($players->isCreative()){
                    $sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::GREEN."1");
                    return true;
                }
                elseif($players->isSurvival()){
                    $sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::BLUE."0");
                    return true;
                }
                else{
                    $sender->sendMessage(TextFormat::YELLOW."> ".TextFormat::WHITE.$players->getName().TextFormat::YELLOW.": ".TextFormat::RED."?");
{'fraction_non_alphanumeric': 0.17437950360288232, 'fraction_numerical': 0.0016012810248198558, 'mean_word_length': 2.945672773215414, 'pattern_counts': {'":': 12, '<': 5, '<?xml version=': 0, '>': 105, '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': '796909', 'n_tokens_mistral': 1849, 'n_tokens_neox': 1786, 'n_words': 260}