aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java
diff options
context:
space:
mode:
authorxander <xander@isxander.dev>2022-09-01 08:59:28 +0100
committerxander <xander@isxander.dev>2022-09-01 08:59:28 +0100
commite63a3c989e3a899bdc81558dd2e4c5cc2c659bde (patch)
tree210f4641cd79904385747cb5f432c7e028ee1068 /src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java
parent6f8ef7daaafd71090b2c334c10eadc8dedc738d9 (diff)
downloadYetAnotherConfigLib-e63a3c989e3a899bdc81558dd2e4c5cc2c659bde.tar.gz
YetAnotherConfigLib-e63a3c989e3a899bdc81558dd2e4c5cc2c659bde.tar.bz2
YetAnotherConfigLib-e63a3c989e3a899bdc81558dd2e4c5cc2c659bde.zip
make YACL builder not require title to construct
Diffstat (limited to 'src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java')
-rw-r--r--src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java b/src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java
index a598e27..a31a4fb 100644
--- a/src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java
+++ b/src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java
@@ -25,8 +25,8 @@ public interface YetAnotherConfigLib {
Screen generateScreen(@Nullable Screen parent);
- static Builder createBuilder(Text title) {
- return new Builder(title);
+ static Builder createBuilder() {
+ return new Builder();
}
class Builder {
@@ -35,9 +35,8 @@ public interface YetAnotherConfigLib {
private Runnable saveFunction = () -> {};
private Consumer<YACLScreen> initConsumer = screen -> {};
- private Builder(@NotNull Text title) {
- Validate.notNull(title, "`title` cannot be null");
- this.title = title;
+ private Builder() {
+
}
public Builder title(@NotNull Text title) {