new settings moved

This commit is contained in:
gnembon committed 2019-06-11 20:24:22 -03:00
1 parent 8ddef0ce6a
commit 79495eccd0
2 files changed
+199 -135

No files matched your search

@@ -62,4 +62,11 @@ public abstract class Validator<T> {
return newValue;
}
}
public static class NONNEGATIVE_NUMBER <T extends Number> extends Validator<T> {
@Override
public T validate(ServerCommandSource source, ParsedRule<T> currentRule, T newValue, String string) {
return newValue.doubleValue() >= 0 ? newValue : null;
}
}
}