This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
ModUpdater/src/main/java/com/thebrokenrail/modupdater/api/ConfigObject.java

16 lines
597 B
Java

package com.thebrokenrail.modupdater.api;
public interface ConfigObject {
String getString(String str) throws MissingValueException;
int getInt(String str) throws MissingValueException;
class MissingValueException extends Exception {
private static final String MISSING_MSG = "Missing Configuration Property: %s";
private static final String INVALID_MSG = "Invalid Configuration Property: %s";
public MissingValueException(boolean invalid, String property) {
super(String.format(invalid ? INVALID_MSG : MISSING_MSG, property));
}
}
}