<commit_before><?php

namespace RTG\Nick;

use pocketmine\Player;
use pocketmine\Server;
use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\player\PlayerQuitEvent;

class NickName extends PluginBase implements Listener {

/**
* All rights reserved RTGNetworkkk
* InspectorGadget (c)
* GitHub: <https://github.com/RTGNetworkkk>
*/
	
	public function onEnable() {
		$this->getServer()->getPluginManager()->registerEvents($this, $this);
		$this->getLogger()->warning("
* Nicker 1.0.0
* Starting..
		");
	}
	
	public function onCommand(CommandSender $sender, Command $cmd, $label, array $param) {
		switch(strtolower($cmd->getName())) {
		
			case "nicker":
			if($sender->hasPermission("nick.command")) {
				if(isset($param[0])) {
					switch(strtolower($param[0])) {
					
						case "set":
							if(isset($param[1])) {
							
								$n = $param[1];
								
								if($sender instanceof Player) {
								
									$sender->setNameTag("** $n");
									$sender->setDisplayName("** $n");
									$sender->sendMessage("You nick has been set to $n");
								
								}
							}
							else {
								$sender->sendMessage("/nicker set <name>");
							}
							return true;
						break;
						
						case "off":
							$name = $sender->getName();
							
							if($sender instanceof Player) {
							
								$sender->setNameTag($name);<commit_msg>V 1.0.1<commit_after><?php

namespace RTG\Nick;

use pocketmine\Player;
use pocketmine\Server;
use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\player\PlayerQuitEvent;
use pocketmine\utils\Config;

class NickName extends PluginBase implements Listener {

/**
* All rights reserved RTGNetworkkk
* InspectorGadget (c)
* GitHub: <https://github.com/RTGNetworkkk>
*/
	
	public function onEnable() {
		$this->getServer()->getPluginManager()->registerEvents($this, $this);
		$this->saveResource("bannednames.txt");
		$this->getLogger()->warning("
* Nicker 1.0.0
* Starting..
		");
		$this->bans = new Config($this->getDataFolder() . "bannednames.txt", Config::ENUM, array());
		$this->bans->getAll();
	}
	
	public function onCommand(CommandSender $sender, Command $cmd, $label, array $param) {
		switch(strtolower($cmd->getName())) {
		
			case "nicker":
			if($sender->hasPermission("nick.command")) {
				if(isset($param[0])) {
					switch(strtolower($param[0])) {
					
						case "set":
							if(isset($param[1])) {
							
								$n = $param[1];
								$b = $this->bans->getAll();
								
								if($sender instanceof Player) {
									if($this->bans->get($n) === true) {
											$sender->sendMessage("You cant use $n");
									}
									else {
										$sender->setNameTag("** $n");
										$sender->setDisplayName("** $n");
										$sender->sendMessage("You nick has been set to $n");
									}
								}
							}
							else {
								$sender->sendMessage("/nicker set <name>");
							}
							return true;
						break;
						
						case "off":
							$name = $sender->getName();
							
							if($sender instanceof Player) {
							
								$sender->setNameTag($name);
{'fraction_non_alphanumeric': 0.16344086021505377, 'fraction_numerical': 0.0052227342549923195, 'mean_word_length': 2.759815242494226, 'pattern_counts': {'":': 6, '<': 9, '<?xml version=': 0, '>': 43, 'https://': 2, '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': '1174640', 'n_tokens_mistral': 1427, 'n_tokens_neox': 997, 'n_words': 197}