aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/isxander/yacl/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dev/isxander/yacl/api')
-rw-r--r--src/main/java/dev/isxander/yacl/api/Binding.java4
-rw-r--r--src/main/java/dev/isxander/yacl/api/Option.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/dev/isxander/yacl/api/Binding.java b/src/main/java/dev/isxander/yacl/api/Binding.java
index d870d8c..37514ca 100644
--- a/src/main/java/dev/isxander/yacl/api/Binding.java
+++ b/src/main/java/dev/isxander/yacl/api/Binding.java
@@ -26,7 +26,7 @@ public interface Binding<T> {
* @param getter should return the current value of the option
* @param setter should set the option to the supplied value
*/
- static <T> Binding<T> of(T def, Supplier<T> getter, Consumer<T> setter) {
+ static <T> Binding<T> generic(T def, Supplier<T> getter, Consumer<T> setter) {
Validate.notNull(def, "`def` must not be null");
Validate.notNull(getter, "`getter` must not be null");
Validate.notNull(setter, "`setter` must not be null");
@@ -37,7 +37,7 @@ public interface Binding<T> {
/**
* Creates a {@link Binding} for Minecraft's {@link SimpleOption}
*/
- static <T> Binding<T> of(SimpleOption<T> minecraftOption) {
+ static <T> Binding<T> minecraft(SimpleOption<T> minecraftOption) {
Validate.notNull(minecraftOption, "`minecraftOption` must not be null");
return new GenericBindingImpl<>(
diff --git a/src/main/java/dev/isxander/yacl/api/Option.java b/src/main/java/dev/isxander/yacl/api/Option.java
index 6598b80..65eae23 100644
--- a/src/main/java/dev/isxander/yacl/api/Option.java
+++ b/src/main/java/dev/isxander/yacl/api/Option.java
@@ -147,7 +147,7 @@ public interface Option<T> {
/**
* Sets the binding for the option.
- * Shorthand of {@link Binding#of(Object, Supplier, Consumer)}
+ * Shorthand of {@link Binding#generic(Object, Supplier, Consumer)}
*
* @param def default value of the option, used to reset
* @param getter should return the current value of the option
@@ -159,7 +159,7 @@ public interface Option<T> {
Validate.notNull(getter, "`getter` must not be null");
Validate.notNull(setter, "`setter` must not be null");
- this.binding = Binding.of(def, getter, setter);
+ this.binding = Binding.generic(def, getter, setter);
return this;
}