2019-02-21 17:07:38 -08:00
|
|
|
package com.gmail.nossr50.config;
|
|
|
|
|
|
|
|
import com.gmail.nossr50.mcMMO;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is for config validation
|
|
|
|
*/
|
|
|
|
public interface UnsafeValueValidation {
|
|
|
|
List<String> validateKeys();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prints all errors found when validating the config
|
|
|
|
*/
|
2019-04-24 22:52:53 -07:00
|
|
|
default void validateEntries() {
|
2019-02-21 17:07:38 -08:00
|
|
|
/*
|
|
|
|
* Print Errors about Keys
|
|
|
|
*/
|
|
|
|
|
|
|
|
List<String> validKeyErrors = validateKeys(); // Validate Keys
|
|
|
|
|
2019-04-24 22:52:53 -07:00
|
|
|
if (validKeyErrors != null && validKeyErrors.size() > 0) {
|
|
|
|
for (String error : validKeyErrors) {
|
2019-02-21 17:07:38 -08:00
|
|
|
mcMMO.p.getLogger().severe(error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|