![]() Note that the '.yml' extension is not automatically appended, and you will have to include that in filenames.Īll usages of the YAML command must include the "id:" argument. You can check whether the YAML object needs to be written to disk with the has_changes tag. In-memory changes to a loaded YAML object will mark that object as having changes. Note that this can have side effects of custom data disappearing (for example, the value "yes" gets magically converted to "true") or strange data parsing in. (for example, when altering YAML data files used by external plugins). When loading, optionally specify 'raw_format' to indicate that this YAML file needs to maintain compatibility with some external system using raw YAML data Similarly, "create" does not create any file, instead it only creates a YAML object in RAM. That means, if you use "set" to make changes, those changes will not be saved to any file, until you use "savefile". Please note that all usages of the YAML command except for "load" and "savefile" arguments are purely in memory. ![]() When creating new paths, prefer all-lowercase to reduce risk of issues. Generally, when using existing paths, make sure your casing is correct. That means '/' separators folders,Īnd '.' as a folder name means go-up-one folder, for example './WorldGuard/config.yml' would load the WorldGuard plugin config.Īlso be aware that some servers (Linux/Mac based) have case sensitive file systems while others (Windows based) don't. The file path follows standard system file path rules. ![]() Use waitable syntax ("- ~yaml load.") with load or savefile actions to avoid locking up the server during file IO.įor loading and saving, the starting path is within 'plugins/Denizen'. It should never be used for storing data that only Denizen needs to use. This commands exists primarily for interoperability with pre-existing data files and other plugins. Yaml / / / / / / ) ( : ) : (data_type : /integer /double /boolean /auto)] Įdits YAML data, especially for YAML files. Learn about how commands work in The Beginner's Guide. Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |