aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/features/FirmamentFeature.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-18 03:20:22 +0200
committernea <nea@nea.moe>2023-05-18 03:20:22 +0200
commit1dd603ab1cc42a602f1d82595dd15789ef63d2a3 (patch)
tree1658e1d32849d69102ff1e1b4c856da8428ab82b /src/main/kotlin/moe/nea/firmament/features/FirmamentFeature.kt
parent3ebe3e80b929b03ad0bcb0c76cec6b3285fe08bd (diff)
downloadfirmament-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.kt18
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()
+
+}