diff options
Diffstat (limited to 'src/main/kotlin/features/debug/DebugLogger.kt')
-rw-r--r-- | src/main/kotlin/features/debug/DebugLogger.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/features/debug/DebugLogger.kt b/src/main/kotlin/features/debug/DebugLogger.kt new file mode 100644 index 0000000..ab06030 --- /dev/null +++ b/src/main/kotlin/features/debug/DebugLogger.kt @@ -0,0 +1,13 @@ + +package moe.nea.firmament.features.debug + +import net.minecraft.text.Text +import moe.nea.firmament.util.MC + +class DebugLogger(val tag: String) { + fun isEnabled() = DeveloperFeatures.isEnabled // TODO: allow filtering by tag + fun log(text: () -> String) { + if (!isEnabled()) return + MC.sendChat(Text.literal(text())) + } +} |