How would you be able to create player files (maybe in .yml or something) and be able to assign information to them and access these information? Take something like SimpleAuth for example, it creates player files for every player that logs in or registers.
My Example: Change NameTags First you have to create a Place where the Files can be saved: PHP: public function onEnable(){ if(!file_exists($this->getDataFolder())){ //Creates the normal DataFolder(PluginName) mkdir($this->getDataFolder()); } $this->getLogger()->info("ยง4Plugin has been enabled!"); $this->getServer()->getPluginManager()->registerEvents($this, $this); if(!is_dir($this->getDataFolder() . "players")) mkdir($this->getDataFolder() . "players", 0777, true); //Creates the folder players in the DataFolder } If a player joins, the plugin will, if there is one, set the Player's nametag to the one in his file: PHP: public function onLogin(PlayerJoinEvent $e){ $e->getPlayer()->setNametag($tag = $this->loadNametag($e->getPlayer())); //Sets the nametag to the one which gets returned at loadNametag $e->getPlayer()->setDisplayName($tag); }public function loadNametag(Player $player){ $file = $this->getDataFolder() . "players/" . strtolower($player->getName()) . ".txt"; //The Player file if(!is_file($file)){ return $player->getName(); // No player file -> No NameTag Change -> Returns the normal Playername }else{ return file_get_contents($file); // Returns the nametag in the file } } Of course you somehow need to set the nametag: PHP: case "nt": if($sender->hasPermission("Test.nametag")){ if(isset($args[0])){ if($player = $this->getServer()->getPlayer($args[0])){ $player = $this->getServer()->getPlayer($args[0]); $nametag = "A Nametag \n> " . $player->getName(); //You can also set $args[1] etc as nametag - \n adds a new line file_put_contents($this->getDataFolder() . "players/" . strtolower($player->getName()) . ".txt", $nametag); //Saves the new nametag in the playerfile, no need to save or remove anything before/after $sender->sendMessage("You succesfully set " . $player->getName() . "'s Nametag."); $player->close(" > Nametag loaded!"); //The changed nametag is only visbile after a relog, so we kick the player after a change return true; } else{ $sender->sendMessage("Invalid Playername!\nUsage: /nt <name>"); return true; } } else{ $sender->sendMessage("Invalid Playername!\nUsage: /nt <name>"); return true; } } else{ $sender->sendMessage("You don't have the Permission to perform this Command!"); return true; } That's it! If you have any questions, ask here