2023-11-16 01:17:27 +01:00
|
|
|
package net.knarcraft.blacksmith.config;
|
|
|
|
|
2024-05-04 01:01:56 +02:00
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
|
2023-11-16 01:17:27 +01:00
|
|
|
/**
|
|
|
|
* 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);
|
2023-11-16 01:17:27 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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);
|
2023-11-16 01:17:27 +01:00
|
|
|
|
|
|
|
}
|