aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/dev/isxander/yacl/api/YetAnotherConfigLib.java9
-rw-r--r--src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java3
2 files changed, 6 insertions, 6 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) {
diff --git a/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java b/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java
index f328ab4..cdaf3a1 100644
--- a/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java
+++ b/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java
@@ -15,7 +15,8 @@ import net.minecraft.text.Text;
public class ModMenuIntegration implements ModMenuApi {
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
- return (parent) -> YetAnotherConfigLib.createBuilder(Text.of("Test GUI"))
+ return (parent) -> YetAnotherConfigLib.createBuilder()
+ .title(Text.of("Test GUI"))
.category(ConfigCategory.createBuilder()
.name(Text.of("Control Examples"))
.option(Option.createBuilder(boolean.class)