From f46fc1e9d85d555cd557eefa10e1211f9ad1ceb1 Mon Sep 17 00:00:00 2001 From: xander Date: Thu, 1 Sep 2022 20:23:00 +0100 Subject: CI stuff rename binding functions and format numbers with commas --- src/main/java/dev/isxander/yacl/api/Binding.java | 4 ++-- src/main/java/dev/isxander/yacl/api/Option.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/dev/isxander/yacl/api') 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 { * @param getter should return the current value of the option * @param setter should set the option to the supplied value */ - static Binding of(T def, Supplier getter, Consumer setter) { + static Binding generic(T def, Supplier getter, Consumer 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 { /** * Creates a {@link Binding} for Minecraft's {@link SimpleOption} */ - static Binding of(SimpleOption minecraftOption) { + static Binding minecraft(SimpleOption 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 { /** * 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 { 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; } -- cgit