mirror of
https://github.com/kami-blue/client
synced 2025-01-25 08:12:46 +00:00
Grammar, have builders return the correct type
This commit is contained in:
parent
d96f39170d
commit
57cc73f928
@ -28,7 +28,7 @@ public class CommandManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
KamiMod.log.info("Commands intialised");
|
||||
KamiMod.log.info("Commands initialised");
|
||||
}
|
||||
|
||||
public void callCommand(String command){
|
||||
|
@ -46,7 +46,7 @@ public class ModuleManager {
|
||||
System.err.println("Couldn't initiate module " + aClass.getSimpleName() + "! Err: " + e.getClass().getSimpleName() + ", message: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
KamiMod.log.info("Modules initialized");
|
||||
KamiMod.log.info("Modules initialised");
|
||||
getModules().sort(Comparator.comparing(Module::getName));
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,9 @@ package me.zeroeightsix.kami.setting.builder.numerical;
|
||||
import me.zeroeightsix.kami.setting.impl.numerical.DoubleSetting;
|
||||
import me.zeroeightsix.kami.setting.impl.numerical.NumberSetting;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Created by 086 on 13/10/2018.
|
||||
*/
|
||||
@ -11,4 +14,50 @@ public class DoubleSettingBuilder extends NumericalSettingBuilder<Double> {
|
||||
public NumberSetting build() {
|
||||
return new DoubleSetting(initialValue, predicate(), consumer(), name, visibilityPredicate(), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withVisibility(Predicate<Double> predicate) {
|
||||
return (DoubleSettingBuilder) super.withVisibility(predicate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withRestriction(Predicate<Double> predicate) {
|
||||
return (DoubleSettingBuilder) super.withRestriction(predicate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withConsumer(BiConsumer<Double, Double> consumer) {
|
||||
return (DoubleSettingBuilder) super.withConsumer(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withValue(Double value) {
|
||||
return (DoubleSettingBuilder) super.withValue(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withRange(Double minimum, Double maximum) {
|
||||
return (DoubleSettingBuilder) super.withRange(minimum, maximum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withMaximum(Double maximum) {
|
||||
return (DoubleSettingBuilder) super.withMaximum(maximum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withListener(BiConsumer<Double, Double> consumer) {
|
||||
return (DoubleSettingBuilder) super.withListener(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withName(String name) {
|
||||
return (DoubleSettingBuilder) super.withName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleSettingBuilder withMinimum(Double minimum) {
|
||||
return (DoubleSettingBuilder) super.withMinimum(minimum);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,9 @@ package me.zeroeightsix.kami.setting.builder.numerical;
|
||||
import me.zeroeightsix.kami.setting.impl.numerical.FloatSetting;
|
||||
import me.zeroeightsix.kami.setting.impl.numerical.NumberSetting;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Created by 086 on 13/10/2018.
|
||||
*/
|
||||
@ -11,4 +14,50 @@ public class FloatSettingBuilder extends NumericalSettingBuilder<Float> {
|
||||
public NumberSetting build() {
|
||||
return new FloatSetting(initialValue, predicate(), consumer(), name, visibilityPredicate(), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withMinimum(Float minimum) {
|
||||
return (FloatSettingBuilder) super.withMinimum(minimum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withName(String name) {
|
||||
return (FloatSettingBuilder) super.withName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withListener(BiConsumer<Float, Float> consumer) {
|
||||
return (FloatSettingBuilder) super.withListener(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withMaximum(Float maximum) {
|
||||
return (FloatSettingBuilder) super.withMaximum(maximum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withRange(Float minimum, Float maximum) {
|
||||
return (FloatSettingBuilder) super.withRange(minimum, maximum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withConsumer(BiConsumer<Float, Float> consumer) {
|
||||
return (FloatSettingBuilder) super.withConsumer(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withValue(Float value) {
|
||||
return (FloatSettingBuilder) super.withValue(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withVisibility(Predicate<Float> predicate) {
|
||||
return (FloatSettingBuilder) super.withVisibility(predicate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatSettingBuilder withRestriction(Predicate<Float> predicate) {
|
||||
return (FloatSettingBuilder) super.withRestriction(predicate);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,9 @@ package me.zeroeightsix.kami.setting.builder.numerical;
|
||||
import me.zeroeightsix.kami.setting.impl.numerical.IntegerSetting;
|
||||
import me.zeroeightsix.kami.setting.impl.numerical.NumberSetting;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Created by 086 on 13/10/2018.
|
||||
*/
|
||||
@ -11,4 +14,49 @@ public class IntegerSettingBuilder extends NumericalSettingBuilder<Integer> {
|
||||
public NumberSetting build() {
|
||||
return new IntegerSetting(initialValue, predicate(), consumer(), name, visibilityPredicate(), min, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerSettingBuilder withMinimum(Integer minimum) {
|
||||
return (IntegerSettingBuilder) super.withMinimum(minimum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NumericalSettingBuilder withName(String name) {
|
||||
return (IntegerSettingBuilder) super.withName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerSettingBuilder withListener(BiConsumer<Integer, Integer> consumer) {
|
||||
return (IntegerSettingBuilder) super.withListener(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerSettingBuilder withMaximum(Integer maximum) {
|
||||
return (IntegerSettingBuilder) super.withMaximum(maximum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerSettingBuilder withRange(Integer minimum, Integer maximum) {
|
||||
return (IntegerSettingBuilder) super.withRange(minimum, maximum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerSettingBuilder withValue(Integer value) {
|
||||
return (IntegerSettingBuilder) super.withValue(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerSettingBuilder withConsumer(BiConsumer<Integer, Integer> consumer) {
|
||||
return (IntegerSettingBuilder) super.withConsumer(consumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerSettingBuilder withRestriction(Predicate<Integer> predicate) {
|
||||
return (IntegerSettingBuilder) super.withRestriction(predicate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerSettingBuilder withVisibility(Predicate<Integer> predicate) {
|
||||
return (IntegerSettingBuilder) super.withVisibility(predicate);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user