File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/main/java/at/hannibal2/skyhanni/features/event/diana Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ object MythologicalCreatureTracker {
9898 }
9999
100100 @HandleEvent
101- fun onChat (event : SkyHanniChatEvent .Modify ) {
101+ fun onChatModify (event : SkyHanniChatEvent .Modify ) {
102102 if (lastSinceAmount == null ) return
103103 val creatureMatch = genericMythologicalSpawnPattern.matchGroups(event.message, " creatureType" )?.getOrNull(0 ) ? : return
104104
@@ -112,8 +112,12 @@ object MythologicalCreatureTracker {
112112 tracker.modify {
113113 for (creatureEntry in DianaApi .mythologicalCreatures.values) {
114114 if (creatureEntry == type) {
115- val newComp = event.chatComponent.copy().append(" §e($lastSinceAmount )" )
116- event.replaceComponent(newComp, " diana_mobs_since" )
115+ if (lastSinceAmount != null ) {
116+ val newComp = event.chatComponent.copy().append(" §e($lastSinceAmount )" )
117+ event.replaceComponent(newComp, " diana_mobs_since" )
118+ }
119+ lastSinceAmount = null
120+
117121 }
118122 }
119123 }
You can’t perform that action at this time.
0 commit comments