diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-03 16:40:15 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-03 16:40:15 +0200 |
commit | 60f6f77cd54b2aba747e6b98d5e6268c7b97bc28 (patch) | |
tree | 6a39671dd8760fbd6392a85ba34b9bc73a73f141 /src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt | |
parent | ab1f85b6184cae079a9cbf1d7a8fd840028e47fd (diff) | |
download | skyhanni-60f6f77cd54b2aba747e6b98d5e6268c7b97bc28.tar.gz skyhanni-60f6f77cd54b2aba747e6b98d5e6268c7b97bc28.tar.bz2 skyhanni-60f6f77cd54b2aba747e6b98d5e6268c7b97bc28.zip |
Fixed weird tuba ability cooldown not working in rift
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt index b9e2b45dc..db000fb25 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt @@ -74,6 +74,11 @@ class MinecraftData { val newItem = hand?.getInternalName() ?: "" if (newItem != InventoryUtils.itemInHandId) { ItemInHandChangeEvent(newItem, hand).postAndCatch() + + InventoryUtils.recentItemsInHand.keys.removeIf { it + 30_000 > System.currentTimeMillis() } + if (newItem != "") { + InventoryUtils.recentItemsInHand[System.currentTimeMillis()] = newItem + } InventoryUtils.itemInHandId = newItem InventoryUtils.latestItemInHand = hand } @@ -82,5 +87,6 @@ class MinecraftData { @SubscribeEvent fun onWorldChange(event: LorenzWorldChangeEvent) { InventoryUtils.itemInHandId = "" + InventoryUtils.recentItemsInHand.clear() } }
\ No newline at end of file |