Allows 0 for positive integers and doubles
It wasn't possible to set extra enchantment chance to 0. This fixes that problem.
This commit is contained in:
		@@ -98,7 +98,7 @@ public final class TypeValidationHelper {
 | 
			
		||||
     */
 | 
			
		||||
    private static boolean isPositiveDouble(Object value, CommandSender sender) {
 | 
			
		||||
        try {
 | 
			
		||||
            return ConfigHelper.asDouble(value) > 0.0;
 | 
			
		||||
            return ConfigHelper.asDouble(value) >= 0.0;
 | 
			
		||||
        } catch (NumberFormatException | NullPointerException exception) {
 | 
			
		||||
            if (sender != null) {
 | 
			
		||||
                displayErrorMessage(sender, TranslatableMessage.INPUT_POSITIVE_DOUBLE_REQUIRED);
 | 
			
		||||
@@ -116,7 +116,7 @@ public final class TypeValidationHelper {
 | 
			
		||||
     */
 | 
			
		||||
    private static boolean isPositiveInteger(Object value, CommandSender sender) {
 | 
			
		||||
        try {
 | 
			
		||||
            return ConfigHelper.asInt(value) > 0;
 | 
			
		||||
            return ConfigHelper.asInt(value) >= 0;
 | 
			
		||||
        } catch (NumberFormatException | NullPointerException exception) {
 | 
			
		||||
            if (sender != null) {
 | 
			
		||||
                displayErrorMessage(sender, TranslatableMessage.INPUT_POSITIVE_INTEGER_REQUIRED);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user