Skip to content

Commit 4a382fb

Browse files
authored
Merge branch 'beta' into Visitor-Pet-Reminder
2 parents cbf5b77 + 679c481 commit 4a382fb

File tree

417 files changed

+3279
-3118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

417 files changed

+3279
-3118
lines changed

CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ format like "- #821" to illustrate the dependency.
121121
- Mixin classes in `at.hannibal2.skyhanni.mixins.transformers`
122122
- New features should be made in Kotlin objects unless there is a specific reason for it not to.
123123
- If the feature needs to use forge events or a repo pattern, annotate it with `@SkyHanniModule`
124-
- This will automatically register it to the forge event bus and load the repo patterns
124+
- This will automatically register it to the forge event bus and load the repo patterns.
125+
- In the background, this will create a new file `LoadedModules.kt` when compiling. Please ignore this file and the related error in `SkyHanniMod.kt`.
125126
- Avoid using deprecated functions.
126127
- These functions are marked for removal in future versions.
127128
- If you're unsure why a function is deprecated or how to replace it, please ask for guidance.

detekt/detekt.yml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ ImportRules:
2525
CustomImportOrdering:
2626
active: true
2727

28+
SkyHanniStyle:
29+
InSkyBlockEarlyReturn:
30+
active: true
31+
2832
style:
2933
MagicNumber: # I, Linnea Gräf, of sound mind and body, disagree with disabling this rule
3034
active: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package at.hannibal2.skyhanni.detektrules.style
2+
3+
import at.hannibal2.skyhanni.detektrules.SkyHanniRule
4+
import io.gitlab.arturbosch.detekt.api.Config
5+
import io.gitlab.arturbosch.detekt.api.Debt
6+
import io.gitlab.arturbosch.detekt.api.Issue
7+
import io.gitlab.arturbosch.detekt.api.Severity
8+
import io.gitlab.arturbosch.detekt.rules.hasAnnotation
9+
import org.jetbrains.kotlin.psi.KtExpression
10+
import org.jetbrains.kotlin.psi.KtIfExpression
11+
import org.jetbrains.kotlin.psi.KtNamedFunction
12+
import org.jetbrains.kotlin.psi.KtReturnExpression
13+
import org.jetbrains.kotlin.psi.psiUtil.collectDescendantsOfType
14+
15+
class InSkyBlockEarlyReturn(config: Config) : SkyHanniRule(config) {
16+
override val issue = Issue(
17+
"InSkyBlockEarlyReturn",
18+
Severity.Style,
19+
".inSkyBlock checks should be removed and replaced with onlyOnSkyblock = true in @HandleEvent annotation",
20+
Debt.FIVE_MINS
21+
)
22+
23+
private fun KtExpression.containsInSkyBlockCheck(): Boolean = text.contains("LorenzUtils.inSkyBlock")
24+
private fun KtExpression.isEarlyReturn(): Boolean = this is KtIfExpression && then is KtReturnExpression
25+
26+
override fun visitNamedFunction(function: KtNamedFunction) {
27+
if (function.hasAnnotation("HandleEvent")) {
28+
val bodyExpressions = function.bodyExpression?.collectDescendantsOfType<KtIfExpression>() ?: return
29+
30+
for (ifExpression in bodyExpressions) {
31+
if (ifExpression.containsInSkyBlockCheck() && ifExpression.isEarlyReturn()) {
32+
ifExpression.reportIssue("This early return should be replaced with onlyOnSkyblock = true in @HandleEvent annotation")
33+
}
34+
}
35+
}
36+
37+
super.visitNamedFunction(function)
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package at.hannibal2.skyhanni.detektrules.style
2+
3+
import com.google.auto.service.AutoService
4+
import io.gitlab.arturbosch.detekt.api.Config
5+
import io.gitlab.arturbosch.detekt.api.RuleSet
6+
import io.gitlab.arturbosch.detekt.api.RuleSetProvider
7+
8+
@AutoService(RuleSetProvider::class)
9+
class SkyHanniStyleProvider : RuleSetProvider {
10+
override val ruleSetId: String = "SkyHanniStyle"
11+
12+
override fun instance(config: Config): RuleSet {
13+
return RuleSet(ruleSetId, listOf(
14+
InSkyBlockEarlyReturn(config)
15+
))
16+
}
17+
}

docs/CHANGELOG.md

+49-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
+ Added Sound Responses. - Thunderblade73 & CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2222)
2121
+ Plays meow sound when 'meow' appears in chat.
2222
+ Plays bark sound when 'woof' appears in chat.
23+
+ Added option to shorten coin amounts in chat messages. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3231)
2324

2425
#### Slayer
2526

@@ -32,6 +33,8 @@
3233
+ Using NEU is still recommended.
3334
+ Added Frog Mask Display. - ILike2WatchMemes (https://github.com/hannibal002/SkyHanni/pull/2542)
3435
+ Displays current buffed region and duration until next change.
36+
+ Added option to display Skyblock XP on the Minecraft XP bar. - j10a1n1 (https://github.com/hannibal002/SkyHanni/pull/2886)
37+
+ Added SkyBlock Level to Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2895)
3538

3639
### Improvements
3740

@@ -42,6 +45,8 @@
4245
#### Inventory Improvements
4346

4447
+ Added time-held display for Discrite in stack size and lore. - Luna (https://github.com/hannibal002/SkyHanni/pull/3101)
48+
+ Added support for more NEU GUIs in Estimated Item Value. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3251)
49+
+ Added Trade Overlay, Equipment Overlay, and Storage Overlay support.
4550

4651
#### Mining Improvements
4752

@@ -62,10 +67,12 @@
6267

6368
+ Added custom sound to the Inquisitor Share feature. - Helium9 (https://github.com/hannibal002/SkyHanni/pull/3160)
6469
+ Replaced old hoppity ready reminder messages when clickable is disabled. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3215)
70+
+ Separated totals from mob list on Mythological Creature Tracker. - indigo_polecat (https://github.com/hannibal002/SkyHanni/pull/3228)
6571

6672
#### Misc Improvements
6773

6874
+ Added EliteBot profile button to Discord Rich Presence. - Chissl (https://github.com/hannibal002/SkyHanni/pull/3169)
75+
+ Improved multiple GUIs by graying out or hiding irrelevant ones. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3218)
6976

7077
### Bug Fixes
7178

@@ -76,7 +83,7 @@
7683
+ Items can still be transferred inside the Rift but cannot be sold for motes.
7784
+ Fixed Motes Session incorrectly showing negative changes as gained motes. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3166)
7885
+ Fixed Rift Blood Effigies detection. - Luna (https://github.com/hannibal002/SkyHanni/pull/3179)
79-
86+
+ Fixed Rift Dance Room Helper always hiding players. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3244)
8087

8188
#### Chocolate Factory Bug Fixes
8289

@@ -96,10 +103,22 @@
96103
+ Fixed copy option in `/playtimedetailed` not working unless Limbo Playtime Detailed is enabled. - Luna (https://github.com/hannibal002/SkyHanni/pull/3193)
97104
+ Fixed missing label on Partyfinder ItemStack. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3219)
98105
+ Fixed showing minion upgrade helper outside the minion menu. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3223)
106+
+ Fixed Estimated Item Value for Wither Blades with Ultimate Wither Scroll. - Luna (https://github.com/hannibal002/SkyHanni/pull/3227)
107+
+ Fixed Experimentation Table Tracker appearing on other islands at correct coordinates. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3239)
108+
+ Fixed Experimentation Table Tracker not detecting Exp Bottles thrown over 5 blocks away. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3239)
109+
+ Limited Experimentation Table Tracker checks to within 15 blocks around the table.
110+
+ Fixed some items not rendering in personal compactor/deletor overlay. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3243)
111+
+ Fixed Anvil Combine Helper not highlighting when a book is in the second slot. - Ownwn (https://github.com/hannibal002/SkyHanni/pull/3258)
112+
+ Fixed bazaar detection in instant buy menu, breaking visibility of features like Visitor Shopping List and Hide Non Clickable Items. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3269)
113+
+ Fixed enchanted clock reminders triggering at incorrect times. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3256)
99114

100115
#### Custom Scoreboard Bug Fixes
101116

102117
+ Fixed Custom Scoreboard Lines sometimes not showing Kuudra Lines. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3157)
118+
+ Fixed "Rift Dimension" appearing on Custom Scoreboard in the Rift. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3230)
119+
+ Fixed Custom Scoreboard in the Garden. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3230)
120+
+ Fixed Custom Scoreboard error when visiting a garden. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3266)
121+
+ Fixed Custom Scoreboard not showing the Mineshaft Room ID. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3254)
103122

104123
#### Garden Bug Fixes
105124

@@ -115,18 +134,39 @@
115134
#### Crimson Isle Bug Fixes
116135

117136
+ Fixed Crimson Quests with two mini-bosses via Tab Widget. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3224)
137+
+ Fixed Town Board waypoint not showing with an incomplete Fetch quest in the Crimson Isle. - Luna (https://github.com/hannibal002/SkyHanni/pull/3233)
118138

119139
#### Event Bug Fixes
120140

121141
+ Fixed issue with Hitman statistics. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3210)
122142

143+
#### Mining Bug Fixes
144+
145+
+ Fixed 'Buy 10 levels' text for fewer levels remaining in HOTM menu. - Nessiesson (https://github.com/hannibal002/SkyHanni/pull/3237)
146+
147+
#### Chat Bug Fixes
148+
149+
+ Fixed `/show` messages from ironman and non-ranked players not reformatted by Chat Player Messages. - Nessiesson (https://github.com/hannibal002/SkyHanni/pull/3238)
150+
151+
#### Command Bug Fixes
152+
153+
+ Fixed `/shskills` command showing usage when resetting a custom skill goal. - Luna (https://github.com/hannibal002/SkyHanni/pull/3264)
154+
155+
#### Dungeon Bug Fixes
156+
157+
+ Fixed incorrect Livid highlighting in F5/M5 sometimes. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2897)
158+
123159
#### Misc Bug Fixes
124160

125161
+ Fixed overflow level-up message not showing and removed dependency on skill progress display. - appable (https://github.com/hannibal002/SkyHanni/pull/3146)
126162
+ Fixed visual words not saving. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3170)
127163
+ Fixed overflow skill level-up messages only appearing above level 60. - Helium9 (https://github.com/hannibal002/SkyHanni/pull/3177)
128164
+ Fixed autoupdater not working with new backport updates in certain situations. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3171)
129165
+ Fixed item information not loading occasionally due to NEU errors. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3191)
166+
+ Fixed a rare crash when using ancient versions of NEU. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3247)
167+
+ Fixed GUI Editor hotkey blocking GUI searches. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3226)
168+
+ Fixed skull crash with missing repo. - nopo (https://github.com/hannibal002/SkyHanni/pull/3229)
169+
+ Fixed SkyBlock XP Bar overriding in Rift & Catacombs. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3252)
130170

131171
### Technical Details
132172

@@ -161,6 +201,14 @@
161201
+ Rewrote ReputationHelper to use Renderables & TabWidgetUpdateEvent. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3207)
162202
+ Split RegexTestMissing Detekt Rule. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3220)
163203
+ Transferred more events to SkyHanniEvent. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3199)
204+
+ Added EnumMap helper methods. - Empa (https://github.com/hannibal002/SkyHanni/pull/3200)
205+
+ Changed more events to SkyHanniEvent. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3234)
206+
+ Cleaned EstimatedItemValueCalculator code: improved onlyTierOnePrices and onlyTierFivePrices calculations. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3250)
207+
+ Cleaned up estimated item value logic. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3255)
208+
+ Resolved some Baseline LongMethod issues. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3240)
209+
+ Reworked Livid color detection. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2897)
210+
+ Added performance improvements.
211+
+ Added easier debugging for future issues.
164212

165213
## Version 1.0.0
166214

docs/DISCORD_FAQ.md

+15-12
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ _Frequently Asked Questions_
3232
> **9: Why does my Item Tracker feature not track this item?**
3333
> 1. Check if the item goes directly into your sacks.
3434
> 2. If it does, enable the sack pickup chat message from Hypixel:
35-
> - Go to `Hypixel Settings --> Personal -> Chat Feedback` and enable `Sack Notifications`.
35+
> - Go to `Hypixel Settings -> Personal -> Chat Feedback` and enable `Sack Notifications`.
3636
> 3. If you want the [Sacks] messages to be hidden, do `/sh sacks hider` and enable that.
3737
3838
> **10: How do I remove SkyHanni GUI elements?**
@@ -42,17 +42,20 @@ _Frequently Asked Questions_
4242
4343
> **11: How do I reset a SkyHanni tracker?**
4444
> 1. Do you want to **view only the current session**?
45-
> - Open the inventory (Press E) and hover over the display.
46-
> - Then click on `[This Session]`.
45+
> - Open the inventory (Press E) and hover over the display.
46+
> - Then click on `[This Session]`.
4747
> 2. Do you want to **reset the current session**?
48-
> - Open the inventory (Press E) and hover over the display.
49-
> - Then click on `Reset Session!`.
50-
> 3. Do you want to **remove one specific item** from the tracker?
51-
> - Open the inventory (Press E) and hover over the display.
52-
> - Then shift-click on an item in the list to remove it.
53-
> 4. Do you want to reset the total stats of a tracker?
54-
> - To reset a tracker, use the in-game command `/shcommands <tracker type>`.
55-
> - Execute the obtained command to reset the tracker.
48+
> - Open the inventory (Press E) and hover over the display.
49+
> - Then click on `Reset Session!`.
50+
> 3. (**For Diana Trackers only**) Do you want to **view only the current mayor**?
51+
> - Open the inventory (Press E) and hover over the display.
52+
> - Then click on `[This Mayor]`.
53+
> 4. Do you want to **remove one specific item** from the tracker?
54+
> - Open the inventory (Press E) and hover over the display.
55+
> - Then shift-click on an item in the list to remove it.
56+
> 5. Do you want to reset the total stats of a tracker?
57+
> - To reset a tracker, use the in-game command `/shcommands <tracker type>`.
58+
> - Execute the obtained command to reset the tracker.
5659
5760
> **12: Why can I still see the normal Scoreboard when using Custom Scoreboard?**
5861
> Most of the time, this is a mod conflict.
@@ -72,5 +75,5 @@ _Frequently Asked Questions_
7275
> If you are using [VolcAddons](https://github.com/zhenga8533/VolcAddons), disable Hide Far/Hide Close Entities.
7376
7477

75-
*This FAQ was last updated on November 24th, 2024.
78+
*This FAQ was last updated on January 18th, 2025.
7679
If you believe there's something that should be added to this list, please tell us, so we can add it.*

docs/FEATURES.md

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
6161
+ Added Sound Responses. - Thunderblade73 & CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2222)
6262
+ Plays meow sound when 'meow' appears in chat.
6363
+ Plays bark sound when 'woof' appears in chat.
64+
+ Added option to shorten coin amounts in chat messages. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3231)
6465

6566
</details>
6667
<details open><summary>
@@ -1369,6 +1370,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
13691370
+ Added the current minister to the calendar. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2342)
13701371
+ Allowed the use of the Custom Scoreboard outside of SkyBlock, but only on Hypixel. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1881)
13711372
+ Added an option to disable custom lines in the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1881)
1373+
+ Added SkyBlock Level to Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2895)
13721374
+ No Bits Available Warning. - Empa (https://github.com/hannibal002/SkyHanni/pull/1286)
13731375
+ Warns when you run out of available bits to generate.
13741376
+ Added Display for Bits on Cookie buy. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2265)
@@ -1473,6 +1475,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
14731475
+ Tracks items and profit while using the Draconic Altar in the End.
14741476
+ Added Frog Mask Display. - ILike2WatchMemes (https://github.com/hannibal002/SkyHanni/pull/2542)
14751477
+ Displays current buffed region and duration until next change.
1478+
+ Added option to display Skyblock XP on the Minecraft XP bar. - j10a1n1 (https://github.com/hannibal002/SkyHanni/pull/2886)
14761479

14771480
</details>
14781481
<details open><summary>

root.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ allprojects {
2121
* Beta version
2222
* Bugfix version
2323
*/
24-
version = "1.5.0"
24+
version = "1.7.0"
2525

2626
repositories {
2727
mavenCentral()

src/main/java/SkyHanniInstallerFrame.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import at.hannibal2.skyhanni.tweaker.DownloadSourceChecker;
2-
31
import javax.imageio.ImageIO;
42
import javax.swing.ImageIcon;
53
import javax.swing.JButton;
@@ -96,8 +94,6 @@ public SkyHanniInstallerFrame() {
9694

9795
public static void main(String[] args) {
9896
try {
99-
DownloadSourceChecker.init();
100-
10197
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
10298
SkyHanniInstallerFrame frame = new SkyHanniInstallerFrame();
10399
frame.centerFrame(frame);

src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt

+8-12
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import at.hannibal2.skyhanni.api.event.HandleEvent
55
import at.hannibal2.skyhanni.data.SackAPI
66
import at.hannibal2.skyhanni.events.GuiContainerEvent
77
import at.hannibal2.skyhanni.events.InventoryCloseEvent
8-
import at.hannibal2.skyhanni.events.LorenzChatEvent
98
import at.hannibal2.skyhanni.events.LorenzTickEvent
10-
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
119
import at.hannibal2.skyhanni.events.MessageSendToServerEvent
10+
import at.hannibal2.skyhanni.events.chat.SkyHanniChatEvent
11+
import at.hannibal2.skyhanni.events.minecraft.ToolTipEvent
1212
import at.hannibal2.skyhanni.features.commands.tabcomplete.GetFromSacksTabComplete
1313
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
1414
import at.hannibal2.skyhanni.test.command.ErrorManager
@@ -105,18 +105,16 @@ object GetFromSackAPI {
105105
inventoryMap.clear()
106106
}
107107

108-
@HandleEvent
108+
@HandleEvent(onlyOnSkyblock = true)
109109
fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) {
110-
if (!LorenzUtils.inSkyBlock) return
111110
if (event.clickedButton != 1) return // filter none right clicks
112111
addToQueue(inventoryMap[event.slotId] ?: return)
113112
inventoryMap.remove(event.slotId)
114113
event.cancel()
115114
}
116115

117-
@SubscribeEvent
118-
fun onTooltip(event: LorenzToolTipEvent) {
119-
if (!LorenzUtils.inSkyBlock) return
116+
@HandleEvent(onlyOnSkyblock = true)
117+
fun onToolTip(event: ToolTipEvent) {
120118
val list = inventoryMap[event.slot.slotIndex] ?: return
121119
event.toolTip.let { tip ->
122120
tip.add("")
@@ -125,9 +123,8 @@ object GetFromSackAPI {
125123
}
126124
}
127125

128-
@HandleEvent
126+
@HandleEvent(onlyOnSkyblock = true)
129127
fun onMessageToServer(event: MessageSendToServerEvent) {
130-
if (!LorenzUtils.inSkyBlock) return
131128
if (!config.queuedGFS && !config.bazaarGFS) return
132129
if (!event.isCommand(commandsWithSlash)) return
133130
val replacedEvent = GetFromSacksTabComplete.handleUnderlineReplace(event)
@@ -204,9 +201,8 @@ object GetFromSackAPI {
204201
return CommandResult.VALID to PrimitiveItemStack(item, amountString.toDouble().toInt())
205202
}
206203

207-
@SubscribeEvent
208-
fun onChat(event: LorenzChatEvent) {
209-
if (!LorenzUtils.inSkyBlock) return
204+
@HandleEvent(onlyOnSkyblock = true)
205+
fun onChat(event: SkyHanniChatEvent) {
210206
if (!config.bazaarGFS || LorenzUtils.noTradeMode) return
211207
val stack = lastItemStack ?: return
212208
val message = event.message

src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt

+1
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ object SkillAPI {
437437
val skill = storage?.get(skillType) ?: return
438438
skill.customGoalLevel = 0
439439
ChatUtils.chat("Custom goal level for §b${skillType.displayName} §ereset")
440+
return
440441
}
441442
}
442443
}

0 commit comments

Comments
 (0)