ModsJava
CustomYml
Java mod listed for Minecraft 1.10–1.15. Download on the author's site.
⬇ Download on SpigotFeatures:
Just to know: one CustomYml holds one physical file.
Saving the file:
If you change anything in a file or remove , you need to save it
Reloading the file:
If a user changed anything in the file, for example with text editor, you will need to reload the file.
Best way to store your yamls:
- You can create custom named yml files.
- You can save easily your custom files.
- You can save files into folders.
- Press the download button and download the file from the github, or there is an external link:
[Link] - Drag and drop the .java file into your project!
- Done!
Just to know: one CustomYml holds one physical file.
- Make a CustomYml class (or as many as file you want)
Code (Java):public CustomYml worldConfig ; - Make a new CustomYml on every server load
Code (Java):public void onEnable ( ) {
worldConfig = new CustomYml ( this ) ; //this: your main class
} - Add after new CustomYml .createNew()
Code (Java):worldConfig = new CustomYml ( this ). createNew ( "FileName" ) ;
//there are other options
worldConfig = new CustomYml ( this ). createNew ( "FileName", true / false ) ; //If you make the second parameter false then the generated config will be empty, if true the plugin will try to copy from .jar and paste
. createNew ( String folder, String fileName ) ;
. createNew ( String folder, String fileName, boolean loadFromJar ) ;
Code (Java):
public CustomYml worldConfig
;
public void onEnable ( ) {
worldConfig = new CustomYml ( this ). createNew ( "worlds" ) ;
}
public void changeSomething ( ) {
worldConfig. getConfig ( ). set ( "Something", " " ) ;
}
public void onEnable ( ) {
worldConfig = new CustomYml ( this ). createNew ( "worlds" ) ;
}
public void changeSomething ( ) {
worldConfig. getConfig ( ). set ( "Something", " " ) ;
}
If you change anything in a file or remove , you need to save it
Code (Java):
worldConfig.
save
(
)
;
Reloading the file:
If a user changed anything in the file, for example with text editor, you will need to reload the file.
Code (Java):
worldConfig.
load
(
)
;
Code (Java):
public
class Configs
{
private static CustomYml classes ;
private static CustomYml shop ;
public Configs (JavaPlugin plugin ) {
classes = new CustomYml (plugin ). createNew ( "class" ) ;
shop = new CustomYml (plugin ). createNew ( "shop" ) ;
}
public static FileConfiguration getClasses ( ) { return classes. getConfig ( ) ; }
public static FileConfiguration getShop ( ) { return shop. getConfig ( ) ; }
public static void saveClasses ( ) { classes. save ( ) ; }
public static void saveShop ( ) { shop. save ( ) ; }
public static void loadClasses ( ) { classes. load ( ) ; }
public static void loadShop ( ) { shop. load ( ) ; }
}
public class MainClass extends JavaPlugin {
public void onEnable ( ) {
new Configs ( this ) ;
}
public void somewhere ( ) {
Configs. getShop ( ) ; //You can use your Configs class everywhere, and dont need to create a new instance
}
}
private static CustomYml classes ;
private static CustomYml shop ;
public Configs (JavaPlugin plugin ) {
classes = new CustomYml (plugin ). createNew ( "class" ) ;
shop = new CustomYml (plugin ). createNew ( "shop" ) ;
}
public static FileConfiguration getClasses ( ) { return classes. getConfig ( ) ; }
public static FileConfiguration getShop ( ) { return shop. getConfig ( ) ; }
public static void saveClasses ( ) { classes. save ( ) ; }
public static void saveShop ( ) { shop. save ( ) ; }
public static void loadClasses ( ) { classes. load ( ) ; }
public static void loadShop ( ) { shop. load ( ) ; }
}
public class MainClass extends JavaPlugin {
public void onEnable ( ) {
new Configs ( this ) ;
}
public void somewhere ( ) {
Configs. getShop ( ) ; //You can use your Configs class everywhere, and dont need to create a new instance
}
}
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.10, 1.11, 1.12
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
CustomYml is a free Minecraft Java mod. Compatible with Minecraft 1.10, 1.11, 1.12, 1.13 and newer. Downloaded 753 times (via Spigot). Download it and open it directly in the game.