diff options
author | nea <nea@nea.moe> | 2023-05-18 03:20:22 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-05-18 03:20:22 +0200 |
commit | 1dd603ab1cc42a602f1d82595dd15789ef63d2a3 (patch) | |
tree | 1658e1d32849d69102ff1e1b4c856da8428ab82b /src/main/kotlin/moe/nea/firmament/features/FirmamentFeature.kt | |
parent | 3ebe3e80b929b03ad0bcb0c76cec6b3285fe08bd (diff) | |
download | firmament-1dd603ab1cc42a602f1d82595dd15789ef63d2a3.tar.gz firmament-1dd603ab1cc42a602f1d82595dd15789ef63d2a3.tar.bz2 firmament-1dd603ab1cc42a602f1d82595dd15789ef63d2a3.zip |
Add slot locking
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/features/FirmamentFeature.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/FirmamentFeature.kt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/FirmamentFeature.kt b/src/main/kotlin/moe/nea/firmament/features/FirmamentFeature.kt new file mode 100644 index 0000000..c9cb8f0 --- /dev/null +++ b/src/main/kotlin/moe/nea/firmament/features/FirmamentFeature.kt @@ -0,0 +1,18 @@ +package moe.nea.firmament.features + +import moe.nea.firmament.util.config.ManagedConfig + +interface FirmamentFeature { + val name: String + val identifier: String + val defaultEnabled: Boolean + get() = true + var isEnabled: Boolean + get() = FeatureManager.isEnabled(identifier) ?: defaultEnabled + set(value) { + FeatureManager.setEnabled(identifier, value) + } + val config: ManagedConfig? get() = null + fun onLoad() + +} |