summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/chat
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/SkyblockXPInChat.kt19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/SkyblockXPInChat.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/SkyblockXPInChat.kt
new file mode 100644
index 000000000..a4b7604ce
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/SkyblockXPInChat.kt
@@ -0,0 +1,19 @@
+package at.hannibal2.skyhanni.features.chat
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.ActionBarStatsData
+import at.hannibal2.skyhanni.events.ActionBarValueUpdate
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+class SkyblockXPInChat {
+
+ val config get() = SkyHanniMod.feature.chat.skyBlockXPInChat
+
+ @SubscribeEvent
+ fun onActionBarValueUpdate(event: ActionBarValueUpdate) {
+ if (event.updated != ActionBarStatsData.SKYBLOCK_XP) return
+ if (!config) return
+ LorenzUtils.chat(event.updated.value)
+ }
+}