mirror of
https://github.com/Theta-Dev/ConstructionWand.git
synced 2025-09-03 16:40:33 +02:00
28 lines
687 B
Java
28 lines
687 B
Java
package thetadev.constructionwand.basics.option;
|
|
|
|
import thetadev.constructionwand.ConstructionWand;
|
|
|
|
public interface IOption<T>
|
|
{
|
|
String getKey();
|
|
String getValueString();
|
|
void setValueString(String val);
|
|
|
|
default String getKeyTranslation() {
|
|
return ConstructionWand.MODID + ".option." + getKey();
|
|
}
|
|
default String getValueTranslation() {
|
|
return ConstructionWand.MODID + ".option." + getKey() + "." + getValueString();
|
|
}
|
|
default String getDescTranslation() {
|
|
return ConstructionWand.MODID + ".option." + getKey() + "." + getValueString() + ".desc";
|
|
}
|
|
|
|
boolean isEnabled();
|
|
void set(T val);
|
|
T get();
|
|
T next(boolean dir);
|
|
default T next() {
|
|
return next(true);
|
|
}
|
|
}
|