mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 10:38:19 +08:00
docs(sample): Add sample codes. 🥚
This commit is contained in:
@@ -51,6 +51,13 @@ public class Sample {
|
||||
@InlineComment("Enabled?") // 行内注释
|
||||
ConfiguredValue<Boolean> ENABLED = ConfiguredValue.of(true);
|
||||
|
||||
ConfiguredList<UUID> UUIDS = ConfiguredList.builderOf(UUID.class).fromString()
|
||||
.parseValue(UUID::fromString).serializeValue(UUID::toString)
|
||||
.defaults(
|
||||
UUID.fromString("00000000-0000-0000-0000-000000000000"),
|
||||
UUID.fromString("00000000-0000-0000-0000-000000000001")
|
||||
).build();
|
||||
|
||||
interface INFO extends Configuration {
|
||||
|
||||
@HeaderComment("Configure your name!") // 头部注释
|
||||
@@ -79,6 +86,10 @@ public class Sample {
|
||||
|
||||
enabled: true # Enabled?
|
||||
|
||||
uuids:
|
||||
- 00000000-0000-0000-0000-000000000000
|
||||
- 00000000-0000-0000-0000-000000000001
|
||||
|
||||
info:
|
||||
# Configure your name!
|
||||
name: Joker
|
||||
|
||||
Reference in New Issue
Block a user