30 lines
786 B
Java
Raw Normal View History

package net.knarcraft.blacksmith.config;
2024-05-04 01:01:56 +02:00
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* An interface describing an object for managing settings
*
* @param <K> <p>The type of setting managed</p>
*/
public interface Settings<K extends Setting> {
/**
* Changes the value of the given setting
*
* @param setting <p>The setting to change</p>
* @param newValue <p>The new value of the setting</p>
*/
2024-05-04 01:01:56 +02:00
void changeValue(@NotNull K setting, @Nullable Object newValue);
/**
* Gets the current raw value of the given global setting
*
* @param setting <p>The setting to get</p>
* @return <p>The current raw setting value</p>
*/
2024-05-04 01:01:56 +02:00
@NotNull Object getRawValue(@NotNull K setting);
}