2023-12-23 13:15:15 +00:00
以下是上述中文文档的英文翻译,尽可能保留原意的同时,调整为更适合美国读者的表述方式:
---
2022-04-16 16:32:33 +00:00
# EasyConfiguration
[![version ](https://img.shields.io/github/v/release/CarmJos/EasyConfiguration )](https://github.com/CarmJos/EasyConfiguration/releases)
2022-04-22 09:54:59 +00:00
[![License ](https://img.shields.io/github/license/CarmJos/EasyConfiguration )](https://www.gnu.org/licenses/lgpl-3.0.html)
2022-04-16 16:32:33 +00:00
[![workflow ](https://github.com/CarmJos/EasyConfiguration/actions/workflows/maven.yml/badge.svg?branch=master )](https://github.com/CarmJos/EasyConfiguration/actions/workflows/maven.yml)
2022-04-17 10:16:16 +00:00
[![CodeFactor ](https://www.codefactor.io/repository/github/carmjos/easyconfiguration/badge )](https://www.codefactor.io/repository/github/carmjos/easyconfiguration)
2022-04-16 16:32:33 +00:00
![CodeSize ](https://img.shields.io/github/languages/code-size/CarmJos/EasyConfiguration )
![](https://visitor-badge.glitch.me/badge?page_id=EasyConfiguration.readme)
2023-12-23 13:15:15 +00:00
**Easy _(to make)_ Configurations!**
Introducing EasyConfiguration, your simple and universal solution for managing configuration files. Enjoy the ease of use with customizable formats for loading, reading, and updating your configuration files.
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
## Advantages
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
- Class-based mechanism for initializing, loading, retrieving, and updating configuration files, ensuring convenience and efficiency.
- Supports manual serialization and deserialization of complex configurations.
- Offers multiple builder forms for rapid construction of `ConfigValue<?>` objects.
- Enables specification of configuration paths, comments, and more via annotations.
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
## Development
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
For a detailed development guide, [click here ](.doc/README.md ). For the latest JavaDoc release, [click here ](https://CarmJos.github.io/EasyConfiguration ).
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
### Code Samples
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
Check out some code demonstrations [here ](demo/src/main/java/cc/carm/lib/configuration/demo/DatabaseConfiguration.java ). For more examples, see the [development guide ](.doc/README.md ).
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
### Dependencies
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
#### Maven Dependency
2022-04-16 16:32:33 +00:00
< details >
2023-12-23 13:15:15 +00:00
< summary > Remote Repository Configuration< / summary >
2022-04-16 16:32:33 +00:00
```xml
< project >
< repositories >
< repository >
2023-12-23 13:15:15 +00:00
<!-- Using Maven Central Repository for secure and stable updates, though synchronization might be needed. -->
2022-04-16 16:32:33 +00:00
< id > maven< / id >
< name > Maven Central< / name >
< url > https://repo1.maven.org/maven2< / url >
< / repository >
2022-04-16 16:41:55 +00:00
2022-04-16 16:32:33 +00:00
< repository >
2023-12-23 13:15:15 +00:00
<!-- Using GitHub dependencies for real - time updates, configuration required (recommended). -->
2022-04-16 16:32:33 +00:00
< id > EasyConfiguration< / id >
< name > GitHub Packages< / name >
< url > https://maven.pkg.github.com/CarmJos/EasyConfiguration< / url >
< / repository >
< / repositories >
< / project >
```
< / details >
< details >
2023-12-23 13:15:15 +00:00
< summary > Generic Native Dependency< / summary >
2022-04-16 16:32:33 +00:00
```xml
< project >
< dependencies >
2023-12-23 13:15:15 +00:00
<!-- Basic implementation part, requiring custom implementation of “Provider” and “Wrapper”. -->
2022-04-16 16:32:33 +00:00
< dependency >
< groupId > cc.carm.lib< / groupId >
< artifactId > easyconfiguration-core< / artifactId >
< version > [LATEST RELEASE]< / version >
< scope > compile< / scope >
< / dependency >
2023-12-23 13:15:15 +00:00
<!-- YAML file - based implementation, compatible with all Java environments. -->
2022-04-16 16:32:33 +00:00
< dependency >
< groupId > cc.carm.lib< / groupId >
< artifactId > easyconfiguration-yaml< / artifactId >
< version > [LATEST RELEASE]< / version >
< scope > compile< / scope >
< / dependency >
2023-12-23 13:15:15 +00:00
<!-- JSON file - based implementation, compatible with all Java environments. Note: JSON does not support file comments. -->
2022-04-23 13:37:18 +00:00
< dependency >
< groupId > cc.carm.lib< / groupId >
< artifactId > easyconfiguration-json< / artifactId >
< version > [LATEST RELEASE]< / version >
< scope > compile< / scope >
< / dependency >
2022-04-16 16:32:33 +00:00
< / dependencies >
< / project >
```
< / details >
2023-12-23 13:15:15 +00:00
#### Gradle Dependency
2022-04-16 16:32:33 +00:00
< details >
2023-12-23 13:15:15 +00:00
< summary > Remote Repository Configuration< / summary >
2022-04-16 16:32:33 +00:00
```groovy
repositories {
2023-12-23 13:15:15 +00:00
// Using Maven Central Repository for secure and stable updates, though synchronization might be needed.
2022-04-16 16:32:33 +00:00
mavenCentral()
2023-12-23 13:15:15 +00:00
// Using GitHub dependencies for real-time updates, configuration required (recommended).
2022-04-16 16:32:33 +00:00
maven { url 'https://maven.pkg.github.com/CarmJos/EasyConfiguration' }
2023-12-23 13:15:15 +00:00
2022-04-16 16:32:33 +00:00
}
```
< / details >
< details >
2023-12-23 13:15:15 +00:00
< summary > Generic Native Dependency< / summary >
2022-04-16 16:32:33 +00:00
```groovy
dependencies {
2023-12-23 13:15:15 +00:00
// Basic implementation part, requiring custom implementation of “Provider” and “Wrapper”.
2022-04-16 16:32:33 +00:00
api "cc.carm.lib:easyconfiguration-core:[LATEST RELEASE]"
2023-12-23 13:15:15 +00:00
// YAML file-based implementation, compatible with all Java environments.
2022-04-16 16:32:33 +00:00
api "cc.carm.lib:easyconfiguration-yaml:[LATEST RELEASE]"
2023-12-23 13:15:15 +00:00
// JSON file-based implementation, compatible with all Java environments. Note: JSON does not support file comments.
2022-04-23 13:37:18 +00:00
api "cc.carm.lib:easyconfiguration-json:[LATEST RELEASE]"
2022-04-16 16:32:33 +00:00
}
```
< / details >
2023-12-23 13:15:15 +00:00
## Derived Projects
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
### [**MineConfiguration**](https://github.com/CarmJos/MineConfiguration) (by @CarmJos)
2022-04-16 16:32:33 +00:00
2022-04-21 11:09:03 +00:00
EasyConfiguration for MineCraft!
2023-12-23 13:15:15 +00:00
Easily manage configurations on MineCraft-related server platforms.
Currently supports BungeeCord, Bukkit (Spigot) servers, with more platforms to be supported soon.
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
## Support and Donation
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
If you appreciate this plugin, consider supporting me with a donation!
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
Thank you for supporting open-source projects!
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
Many thanks to Jetbrains for kindly providing a license for us to work on this and other open-source projects.
[![ ](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg )](https://www.jetbrains.com/?from=https://github.com/ArtformGames/ResidenceList)
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
## Open Source License
2022-04-16 16:32:33 +00:00
2023-12-23 13:15:15 +00:00
This project's source code is licensed under the [GNU LESSER GENERAL PUBLIC LICENSE ](https://www.gnu.org/licenses/lgpl-3.0.html ).