All i wanna do is make a file for example And append more players in this way. Code: Primus: 2 Steve: 1 Bob: 0 Notch: 0 Enderman: 9 and read it like in yaml PHP: ->get("Primus"); but i wont use yaml cuz i read that using yaml for that purpose is not a good idea
if your saving it in your config.yml file use Code: $this->getConfig()->get("InsertHere"); but as crazedminer said it would be more ideal to just use a txt file.
it Dosent matter what extension u save the file as it's still classified as a config, the different file types are used for different things; .yml is used for editing to customise parts of a plugin .txt is used for being constantly written to internally
You are wrong. .yml is a file extension for files containing data in format of an array / map (associative array) . It is not specific for containing configuration files and plugin manifest files. It has similar properties to JSON. As for .txt, it is for saving data with plaintext. It is also for files that you don't want to give a special file extension to. File extensions are used by the operating system (OS) to decide what apps to open the file with. But from a programming perspective, opening files of different file extensions, as long as they are files, have no difference. Why we call it file extension? Because it is an extension (and part of) the filename. Opening streams of different file extensions have no difference. You can even modify PocketMine source and change plugin.yml to plugin.txt, or make a config file of file extension .txt (see my old plugin InfoEssentials). (see MCPE for android; it saves its internal config files at ~/games/com.mojang/minecraftpe/*.txt) So basically, file extensions are just a way to let users to know what file type that file approximately is.
This is true however, I like to use .yml files as files that will be edited by a person and .txt files for saving things internally that a person doesn't need to open as it saves internal things like stats.
Alright then. But you're saying it in a way that if you don't use the correct file extension it won't work.
That's icky because if they do want to open and edit the stats, their IDE won't provide YML language support and there is a much higher likelihood of a syntax error.