Upload
This commit is contained in:
43
README.md
Normal file
43
README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
## 📄 MysticCore YML-Manager
|
||||
_dveveloped by JernejTDO_
|
||||
|
||||
A lightweight, high-performance YAML configuration library designed to mimic the intuitive Spigot/Bukkit YamlConfiguration API. This manager provides a simple way to read, write, and update nested YAML files.
|
||||
|
||||
## 📥 Maven
|
||||
Repository
|
||||
```xml
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>gitea</id>
|
||||
<url>https://git.triler.eu/api/packages/JernejTDO/maven</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
```
|
||||
Dependency
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>net.triler</groupId>
|
||||
<artifactId>yml-manager</artifactId>
|
||||
<version>0.1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## 🛠 Usage Example
|
||||
```java
|
||||
File file = new File("config.yml");
|
||||
ConfigManager config = new ConfigManager(file);
|
||||
|
||||
// Load the data from the disk
|
||||
config.load();
|
||||
|
||||
// Read values easily
|
||||
String host = config.getString("mysql.host");
|
||||
int port = config.getInt("mysql.port");
|
||||
|
||||
// Update or Create new keys
|
||||
config.set("mysql.port", 3307);
|
||||
config.set("commands.fly.enable", true);
|
||||
|
||||
// Save the changes back to the file
|
||||
config.save();
|
||||
```
|
||||
Reference in New Issue
Block a user