aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt24
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureMessageShortener.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt20
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt18
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt17
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt15
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenNextPlotPrice.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt18
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/SuperpairsClicksAlert.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt16
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt107
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt6
98 files changed, 387 insertions, 296 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index f59830810..a84c86c4f 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -376,7 +376,7 @@ object Commands {
@JvmStatic
fun openFortuneGuide() {
if (!LorenzUtils.inSkyBlock) {
- LorenzUtils.chat("§cJoin SkyBlock to open the fortune guide!")
+ LorenzUtils.chat("§cJoin SkyBlock to open the fortune guide!", false)
} else {
CaptureFarmingGear.captureFarmingGear()
SkyHanniMod.screenToOpen = FFGuideGUI()
@@ -386,7 +386,7 @@ object Commands {
@JvmStatic
fun openVisualWords() {
if (!LorenzUtils.onHypixel) {
- LorenzUtils.chat("§cYou need to join Hypixel to use this feature!")
+ LorenzUtils.chat("§cYou need to join Hypixel to use this feature!", false)
} else {
if (VisualWordGui.sbeConfigPath.exists()) VisualWordGui.drawImport = true
SkyHanniMod.screenToOpen = VisualWordGui()
@@ -395,7 +395,7 @@ object Commands {
private fun clearFarmingItems() {
val storage = GardenAPI.storage?.fortune ?: return
- LorenzUtils.chat("§e[SkyHanni] clearing farming items")
+ LorenzUtils.chat("clearing farming items")
storage.farmingItems.clear()
storage.outdatedItems.clear()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
index b9a6d84bb..90fe4783e 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
@@ -32,17 +32,17 @@ object PartyAPI {
fun listMembers() {
val size = partyMembers.size
if (size == 0) {
- LorenzUtils.chat("§e[SkyHanni] No tracked party members!")
+ LorenzUtils.chat("No tracked party members!")
return
}
- LorenzUtils.chat("§a[SkyHanni] Tracked party members §7($size) §f:")
+ LorenzUtils.chat("Tracked party members §7($size) §f:", prefixColor = "§a")
for (member in partyMembers) {
- LorenzUtils.chat(" §a- §7$member")
+ LorenzUtils.chat(" §a- §7$member", false)
}
if (Random.nextDouble() < 0.1) {
OSUtils.openBrowser("https://www.youtube.com/watch?v=iANP7ib7CPA")
- LorenzUtils.hoverableChat("§7Are You Ready To Party?", listOf("§b~Spongebob"))
+ LorenzUtils.hoverableChat("§7Are You Ready To Party?", listOf("§b~Spongebob"), prefix = false)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
index a8770e1f2..8e6f9bb7d 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
@@ -105,7 +105,7 @@ object ProfileStorageData {
if (System.currentTimeMillis() > noTabListTime + 3_000) {
noTabListTime = System.currentTimeMillis()
LorenzUtils.chat(
- "§c[SkyHanni] Extra Information from Tab list not found! " +
+ "Extra Information from Tab list not found! " +
"Enable it: SkyBlock Menu ➜ Settings ➜ Personal ➜ User Interface ➜ Player List Info"
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
index 593d9a652..9dcba5e8f 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt
@@ -83,7 +83,7 @@ class RepoManager(private val configLocation: File) {
if (unsuccessfulConstants.isEmpty()) {
if (command) {
- LorenzUtils.chat("§e[SkyHanni] §7The repo is already up to date!")
+ LorenzUtils.chat("§7The repo is already up to date!")
atomicShouldManuallyReload.set(false)
}
return@supplyAsync false
@@ -156,12 +156,13 @@ class RepoManager(private val configLocation: File) {
}
comp.complete(null)
if (answerMessage.isNotEmpty() && !error) {
- LorenzUtils.chat("§e[SkyHanni] §a$answerMessage")
+ LorenzUtils.chat("§a$answerMessage")
}
if (error) {
LorenzUtils.clickableChat(
- "§e[SkyHanni] Error with the repo detected, try /shupdaterepo to fix it!",
- "shupdaterepo"
+ "Error with the repo detected, try /shupdaterepo to fix it!",
+ "shupdaterepo",
+ prefixColor = "§c"
)
if (unsuccessfulConstants.isEmpty()) {
unsuccessfulConstants.add("All Constants")
@@ -174,9 +175,12 @@ class RepoManager(private val configLocation: File) {
fun displayRepoStatus(joinEvent: Boolean) {
if (joinEvent) {
if (unsuccessfulConstants.isNotEmpty()) {
- LorenzUtils.chat("§c[SkyHanni] §7Repo Issue! Some features may not work. Please report this error on the Discord!")
- LorenzUtils.chat("§7Repo Auto Update Value: §c${SkyHanniMod.feature.dev.repoAutoUpdate}")
- LorenzUtils.chat("§7If you have Repo Auto Update turned off, please try turning that on.\n§cUnsuccessful Constants §7(${unsuccessfulConstants.size}):")
+ LorenzUtils.error(
+ "§7Repo Issue! Some features may not work. Please report this error on the Discord!\n"
+ + "§7Repo Auto Update Value: §c${SkyHanniMod.feature.dev.repoAutoUpdate}\n"
+ + "§7If you have Repo Auto Update turned off, please try turning that on.\n"
+ + "§cUnsuccessful Constants §7(${unsuccessfulConstants.size}):"
+ )
for (constant in unsuccessfulConstants) {
LorenzUtils.chat(" §e- §7$constant")
}
@@ -184,14 +188,14 @@ class RepoManager(private val configLocation: File) {
return
}
if (unsuccessfulConstants.isEmpty() && successfulConstants.isNotEmpty()) {
- LorenzUtils.chat("§a[SkyHanni] Repo working fine!")
+ LorenzUtils.chat("Repo working fine!", prefixColor = "§a")
return
}
- if (successfulConstants.isNotEmpty()) LorenzUtils.chat("§a[SkyHanni] Successful Constants §7(${successfulConstants.size}):")
+ if (successfulConstants.isNotEmpty()) LorenzUtils.chat("Successful Constants §7(${successfulConstants.size}):", prefixColor = "§a")
for (constant in successfulConstants) {
LorenzUtils.chat(" §a- §7$constant")
}
- LorenzUtils.chat("§c[SkyHanni] Unsuccessful Constants §7(${unsuccessfulConstants.size}):")
+ LorenzUtils.chat("Unsuccessful Constants §7(${unsuccessfulConstants.size}):")
for (constant in unsuccessfulConstants) {
LorenzUtils.chat(" §e- §7$constant")
}
diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt
index 2f39e381d..21f9d07e8 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt
@@ -40,7 +40,7 @@ abstract class LorenzEvent : Event() {
}
if (errors > visibleErrors) {
val hiddenErrors = errors - visibleErrors
- LorenzUtils.chat("§c[SkyHanni] $hiddenErrors more errors in $eventName are hidden!")
+ LorenzUtils.error("$hiddenErrors more errors in $eventName are hidden!")
}
return if (isCancelable) isCanceled else false
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt
index 3fce3b4d3..38e012128 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt
@@ -42,7 +42,7 @@ class BazaarCancelledBuyOrderClipboard {
patternCancelledMessage.matchMatcher(event.message) {
event.blockedReason = "bazaar cancelled buy order clipbaord"
val coins = group("coins")
- LorenzUtils.chat("§e[SkyHanni] Bazaar buy order cancelled. $latestAmount saved to clipboard. ($coins coins)")
+ LorenzUtils.chat("Bazaar buy order cancelled. $latestAmount saved to clipboard. ($coins coins)")
latestAmount?.let { OSUtils.copyToClipboard(it.replace(",", "")) }
latestAmount = null
@@ -50,4 +50,4 @@ class BazaarCancelledBuyOrderClipboard {
}
fun isEnabled() = LorenzUtils.inSkyBlock && SkyHanniMod.feature.bazaar.cancelledBuyOrderClipboard
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
index 0badd1e57..b59eae0b2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
@@ -51,11 +51,11 @@ class BingoCardDisplay {
fun toggleCommand() {
if (!LorenzUtils.isBingoProfile) {
- LorenzUtils.chat("§cThis command only works on a bingo profile!")
+ LorenzUtils.userError("This command only works on a bingo profile!")
return
}
if (!config.enabled) {
- LorenzUtils.chat("§cBingo Card is disabled in the config!")
+ LorenzUtils.userError("Bingo Card is disabled in the config!")
return
}
toggleMode()
@@ -189,4 +189,4 @@ class BingoCardDisplay {
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(2, "bingo", "event.bingo")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
index fd077824b..8e74b434f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
@@ -200,7 +200,7 @@ class BingoNextStepHelper {
done = true
updateResult()
if (!silent && config.stepHelper) {
- LorenzUtils.chat("§e[SkyHanni] A bingo goal step is done! ($displayName)")
+ LorenzUtils.chat("A bingo goal step is done! ($displayName)")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt
index 5f49d40ce..e686191aa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt
@@ -93,7 +93,7 @@ class CompactBingoChat {
if (message.contains("Trade") || message.contains("Recipe")) {
val text = message.removeColor().replace(" ", "")
if (text == "Trade" || text == "Recipe") {
- collectionLevelUpLastLine?.let { LorenzUtils.chat(it) }
+ collectionLevelUpLastLine?.let { LorenzUtils.chat(it, false) }
}
} else {
collectionLevelUpLastLine = message
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt
index 05a3ba456..3c1586d61 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt
@@ -61,11 +61,11 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult
if (mouseX in 0..w && mouseY in 0..(size * 10) && (isMouseButtonDown && !wasMouseButtonDown)) {
if (KeyboardManager.isShiftKeyDown()) {
OSUtils.copyToClipboard(IChatComponent.Serializer.componentToJson(msg.message))
- LorenzUtils.chat("Copied structured chat line to clipboard")
+ LorenzUtils.chat("Copied structured chat line to clipboard", false)
} else {
val message = LorenzUtils.stripVanillaMessage(msg.message.formattedText)
OSUtils.copyToClipboard(message)
- LorenzUtils.chat("Copied chat line to clipboard")
+ LorenzUtils.chat("Copied chat line to clipboard", false)
}
}
mouseY -= size * 10
@@ -118,4 +118,4 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult
setScroll(scroll - Mouse.getEventDWheel())
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt
index 192e51297..ff3444bb0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt
@@ -66,13 +66,13 @@ class CompactBestiaryChatMessage {
inBestiary = false
val title = bestiaryDescription[1]
- LorenzUtils.hoverableChat("§6§lBESTIARY §r$title", bestiaryDescription.dropLast(1), command)
+ LorenzUtils.hoverableChat("§6§lBESTIARY §r$title", bestiaryDescription.dropLast(1), command, false)
bestiaryDescription.clear()
acceptMoreDescription = true
} else {
milestoneMessage?.let {
- LorenzUtils.chat("§6§lBESTIARY MILESTONE $it")
+ LorenzUtils.chat("§6§lBESTIARY MILESTONE $it", false)
milestoneMessage = null
}
milestonePattern.matchEntire(message)?.let {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
index 943490a55..87692135e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
@@ -39,7 +39,7 @@ class PlayerDeathMessages {
val name = group("name")
if (SkyHanniMod.feature.markedPlayers.highlightInChat && !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight && MarkedPlayerManager.isMarkedPlayer(name)) {
val reason = group("reason").removeColor()
- LorenzUtils.chat(" §c☠ §e$name §7$reason")
+ LorenzUtils.chat(" §c☠ §e$name §7$reason", false)
event.blockedReason = "marked_player_death"
return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt
index 6105d762a..2cfdb5dc9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt
@@ -144,15 +144,15 @@ class Translator {
coroutineScope.launch {
val translation = getTranslationToEnglish(message)
- if (translation == "Unable to translate!") LorenzUtils.chat("§c[SkyHanni] Unable to translate message :( (is it in English?)")
- else LorenzUtils.chat("§e[SkyHanni] Found translation: §f$translation")
+ if (translation == "Unable to translate!") LorenzUtils.userError("Unable to translate message :( (is it in English?)")
+ else LorenzUtils.chat("Found translation: §f$translation")
}
}
fun fromEnglish(args: Array<String>) {
if (!isEnabled()) return
if (args.size < 2 || args[0].length != 2) { // args[0] is the language code
- LorenzUtils.chat("§cUsage: /shcopytranslation <two letter language code (at the end of a translation)> <message>")
+ LorenzUtils.userError("Usage: /shcopytranslation <two letter language code (at the end of a translation)> <message>")
return
}
val language = args[0]
@@ -163,7 +163,7 @@ class Translator {
coroutineScope.launch {
val translation = getTranslationFromEnglish(message, language)
- LorenzUtils.chat("§e[SkyHanni] Copied translation to clipboard: $translation")
+ LorenzUtils.chat("Copied translation to clipboard: $translation")
OSUtils.copyToClipboard(translation)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
index 656ac7b9d..171e45f90 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
@@ -292,8 +292,9 @@ object GhostCounter {
notifyCTModule = false
if (isUsingCTGhostCounter()) {
clickableChat(
- "§6[SkyHanni] GhostCounterV3 ChatTriggers module has been detected, do you want to import saved data ? Click here to import data",
- "shimportghostcounterdata"
+ "GhostCounterV3 ChatTriggers module has been detected, do you want to import saved data ? Click here to import data",
+ "shimportghostcounterdata",
+ prefixColor = "§6",
)
}
}
@@ -478,7 +479,7 @@ object GhostCounter {
fun onConfigLoad(event: ConfigLoadEvent) {
if (storage?.configUpdateVersion == 0) {
config.textFormatting.bestiaryFormatting.base = " &6Bestiary %display%: &b%value%"
- chat("§e[SkyHanni] Your GhostCounter config has been automatically adjusted.")
+ chat("Your GhostCounter config has been automatically adjusted.")
storage?.configUpdateVersion = CONFIG_VALUE_VERSION
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt
index b5b833423..9c5de8c43 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostUtil.kt
@@ -65,7 +65,7 @@ object GhostUtil {
val c = ProfileStorageData.profileSpecific?.ghostCounter ?: return
if (isUsingCTGhostCounter()) {
if (c.ctDataImported) {
- LorenzUtils.chat("§e[SkyHanni] §cYou already imported GhostCounterV3 data!")
+ LorenzUtils.userError("You already imported GhostCounterV3 data!")
return
}
val json = ConfigManager.gson.fromJson(
@@ -83,9 +83,9 @@ object GhostUtil {
?: json["TotalMF"].asDouble
GhostData.Option.TOTALDROPS.add(json["TotalDrops"].asDouble)
c.ctDataImported = true
- LorenzUtils.chat("§e[SkyHanni] §aImported data successfully!")
+ LorenzUtils.chat("§aImported data successfully!")
} else
- LorenzUtils.chat("§e[SkyHanni] §cGhostCounterV3 ChatTriggers module not found!")
+ LorenzUtils.error("GhostCounterV3 ChatTriggers module not found!")
}
fun String.formatText(option: GhostData.Option) = formatText(option.getInt(), option.getInt(true))
diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt
index c515cb7f0..de7cc4408 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/commands/WikiManager.kt
@@ -43,7 +43,7 @@ class WikiManager {
if (!(message.startsWith("/wiki"))) return
event.isCanceled = true
if (message == "/wiki") {
- LorenzUtils.chat("§e[SkyHanni] Opening the Fandom Wiki..")
+ LorenzUtils.chat("Opening the Fandom Wiki..")
OSUtils.openBrowser("${urlPrefix}Hypixel_SkyBlock_Wiki")
} else if (message.startsWith("/wiki ") || message == ("/wikithis")) { //conditional to see if we need Special:Search page
if (message == ("/wikithis")) {
@@ -51,7 +51,7 @@ class WikiManager {
wikiTheItem(itemInHand)
} else {
val search = packet.message.split("/wiki ").last()
- LorenzUtils.chat("§e[SkyHanni] Searching the Fandom Wiki for §a$search")
+ LorenzUtils.chat("Searching the Fandom Wiki for §a$search")
val wikiUrlCustom = "$urlSearchPrefix$search&scope=internal"
OSUtils.openBrowser(wikiUrlCustom.replace(' ', '+'))
}
@@ -73,7 +73,7 @@ class WikiManager {
private fun wikiTheItem(item: ItemStack) {
val itemDisplayName = (item.nameWithEnchantment ?: return).replace("§a✔ ", "").replace("§c✖ ", "")
val internalName = item.getInternalName().asString()
- LorenzUtils.chat("§e[SkyHanni] Searching the Fandom Wiki for §a$itemDisplayName")
+ LorenzUtils.chat("Searching the Fandom Wiki for §a$itemDisplayName")
val wikiUrlSearch = if (internalName != "NONE") "$urlSearchPrefix$internalName&scope=internal"
else "$urlSearchPrefix${itemDisplayName.removeColor()}&scope=internal"
OSUtils.openBrowser(wikiUrlSearch.replace(' ', '+'))
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
index 701ef74ee..07a4edf18 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
@@ -73,7 +73,7 @@ class DungeonCleanEnd {
if (event.health <= 0.5) {
val dungeonFloor = DungeonAPI.dungeonFloor
- LorenzUtils.chat("§eFloor $dungeonFloor done!")
+ LorenzUtils.chat("§eFloor $dungeonFloor done!", false)
bossDone = true
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt
index b1db55502..88ab543f0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt
@@ -53,7 +53,7 @@ class DungeonDeathCounter {
if (isDeathMessage(event.message)) {
deaths++
- LorenzUtils.chat("§c§l$deaths. DEATH!")
+ LorenzUtils.chat("§c§l$deaths. DEATH!", false)
update()
}
}
@@ -94,4 +94,4 @@ class DungeonDeathCounter {
private fun isEnabled(): Boolean {
return LorenzUtils.inDungeons && SkyHanniMod.feature.dungeon.deathCounterDisplay
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
index fdb41a87a..3c1486467 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
@@ -43,10 +43,8 @@ class BurrowWarpHelper {
if (lastWarpTime.passedSince() < 1.seconds) {
lastWarp?.let {
it.unlocked = false
- LorenzUtils.chat(
- "§e[SkyHanni] Detected not having access to warp point §b${it.displayName}§e!\n" +
- "§e[SkyHanni] Use §c/shresetburrowwarps §eonce you have activated this travel scroll."
- )
+ LorenzUtils.chat("Detected not having access to warp point §b${it.displayName}§e!")
+ LorenzUtils.chat("Use §c/shresetburrowwarps §eonce you have activated this travel scroll.")
lastWarp = null
currentWarp = null
}
@@ -84,7 +82,7 @@ class BurrowWarpHelper {
fun resetDisabledWarps() {
WarpPoint.entries.forEach { it.unlocked = true }
- LorenzUtils.chat("§e[SkyHanni] Reset disabled burrow warps.")
+ LorenzUtils.chat("Reset disabled burrow warps.")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
index b7637624c..a756f208b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
@@ -20,7 +20,7 @@ class GriffinPetWarning {
if (!DianaAPI.hasGriffinPet() && lastWarnTime.passedSince() > 30.seconds) {
lastWarnTime = SimpleTimeMark.now()
LorenzUtils.sendTitle("§cGriffin Pet!", 3.seconds)
- LorenzUtils.chat("§e[SkyHanni] Reminder to use a Griffin pet for Mythological Ritual!")
+ LorenzUtils.chat("Reminder to use a Griffin pet for Mythological Ritual!")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
index e466c88a0..c4f12a993 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
@@ -53,7 +53,7 @@ object InquisitorWaypointShare {
fun test() {
test = !test
- LorenzUtils.chat("§e[SkyHanni] Inquisitor Test " + if (test) "Enabled" else "Disabled")
+ LorenzUtils.chat("Inquisitor Test " + if (test) "Enabled" else "Disabled")
}
@SubscribeEvent
@@ -144,7 +144,7 @@ object InquisitorWaypointShare {
} else {
val keyName = KeyboardManager.getKeyName(config.keyBindShare)
val message =
- "§e[SkyHanni] §l§bYou found a Inquisitor! Press §l§chere §l§bor §c$keyName to share the location!"
+ "§l§bYou found a Inquisitor! Press §l§chere §l§bor §c$keyName to share the location!"
LorenzUtils.clickableChat(message, "shshareinquis")
}
}
@@ -189,7 +189,7 @@ object InquisitorWaypointShare {
lastShareTime = System.currentTimeMillis()
if (inquisitor == -1) {
- LorenzUtils.chat("§c[SkyHanni] No Inquisitor Found!")
+ LorenzUtils.error("No Inquisitor Found!")
return
}
@@ -200,7 +200,7 @@ object InquisitorWaypointShare {
}
if (inquisitor.isDead) {
- LorenzUtils.chat("§cInquisitor is ded")
+ LorenzUtils.chat("§cInquisitor is dead")
return
}
val location = inquisitor.getLorenzVec()
@@ -229,7 +229,7 @@ object InquisitorWaypointShare {
val cleanName = playerName.cleanPlayerName()
if (!waypoints.containsKey(cleanName)) {
- LorenzUtils.chat("§e[SkyHanni] $playerName §l§efound an inquisitor at §l§c$x $y $z!")
+ LorenzUtils.chat("$playerName §l§efound an inquisitor at §l§c$x $y $z!")
if (cleanName != LorenzUtils.getPlayerName()) {
LorenzUtils.sendTitle("§dINQUISITOR §efrom §b$cleanName", 5.seconds)
SoundUtils.playBeepSound()
@@ -256,7 +256,7 @@ object InquisitorWaypointShare {
fun maybeRemove(playerName: String) {
if (inquisitorsNearby.isEmpty()) {
waypoints = waypoints.editCopy { remove(playerName) }
- LorenzUtils.chat("§e[SkyHanni] Inquisitor from $playerName not found, deleting.")
+ LorenzUtils.chat("Inquisitor from $playerName not found, deleting.")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt
index 436cf7b8f..6d010fae7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fame/AccountUpgradeReminder.kt
@@ -54,7 +54,7 @@ class AccountUpgradeReminder {
lastReminderSend = SimpleTimeMark.now()
LorenzUtils.clickableChat(
- "§e[SkyHanni] The §a$upgrade §eupgrade has completed! §c(Click to disable these reminders)",
+ "The §a$upgrade §eupgrade has completed! §c(Click to disable these reminders)",
"shstopaccountupgradereminder"
)
}
@@ -117,4 +117,4 @@ class AccountUpgradeReminder {
SkyHanniMod.feature.misc.accountUpgradeReminder = false
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt
index 0d6f1cd75..d47e32981 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fame/CityProjectFeatures.kt
@@ -42,7 +42,7 @@ class CityProjectFeatures {
private val config get() = SkyHanniMod.feature.event.cityProject
fun disable() {
config.dailyReminder = false
- LorenzUtils.chat("§c[SkyHanni] Disabled city project reminder messages!")
+ LorenzUtils.chat("Disabled city project reminder messages!")
}
}
@@ -68,7 +68,7 @@ class CityProjectFeatures {
lastReminderSend = System.currentTimeMillis()
LorenzUtils.clickableChat(
- "§e[SkyHanni] Daily City Project Reminder! (Click here to disable this reminder)",
+ "Daily City Project Reminder! (Click here to disable this reminder)",
"shstopcityprojectreminder"
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt
index 8caf8cb20..7688a7f98 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt
@@ -76,13 +76,13 @@ class FishingBaitWarnings {
private fun showBaitChangeWarning(before: String, after: String) {
SoundUtils.playClickSound()
LorenzUtils.sendTitle("§eBait changed!", 2.seconds)
- LorenzUtils.chat("§e[SkyHanni] Fishing Bait changed: $before -> $after")
+ LorenzUtils.chat("Fishing Bait changed: $before -> $after")
}
private fun showNoBaitWarning() {
SoundUtils.playErrorSound()
LorenzUtils.sendTitle("§cNo bait is used!", 2.seconds)
- LorenzUtils.chat("§e[SkyHanni] You do not use any fishing baits!")
+ LorenzUtils.chat("You do not use any fishing baits!")
}
private fun isEnabled() = LorenzUtils.inSkyBlock && FishingAPI.hasFishingRodInHand()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureMessageShortener.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureMessageShortener.kt
index f9cb0d861..0525031c0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureMessageShortener.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureMessageShortener.kt
@@ -15,17 +15,14 @@ class SeaCreatureMessageShortener {
val seaCreature = event.seaCreature
event.chatEvent.blockedReason = "sea_creature_caught"
- var message = if (config.shortenFishingMessage) {
+ val doubleHookPrefix = if (config.compactDoubleHook && event.doubleHook) "§e§lDOUBLE HOOK! " else ""
+ val message = doubleHookPrefix + if (config.shortenFishingMessage) {
"§9You caught a ${seaCreature.displayName}§9!"
} else event.chatEvent.message
-
- if (config.compactDoubleHook && event.doubleHook) {
- message = "§e§lDOUBLE HOOK! $message"
- }
- LorenzUtils.chat(message)
+ LorenzUtils.chat(message, false)
if (seaCreature.fishingExperience == 0) {
LorenzUtils.debug("no fishing exp set for " + seaCreature.name)
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt
index 8861f0663..bc9cb9724 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt
@@ -48,7 +48,7 @@ class SharkFishCounter {
counter < 350 -> "Like a pro!"
else -> "How???"
}
- LorenzUtils.chat("§e[SkyHanni] You caught ${counter.addSeparators()} sharks during this fishing contest. $funnyComment")
+ LorenzUtils.chat("You caught ${counter.addSeparators()} sharks during this fishing contest. $funnyComment")
counter = 0
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt
index 7723617a9..b1abdc2d5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt
@@ -43,7 +43,7 @@ class TrophyFishMessages {
event.blockedReason = "trophy_fish"
if (config.enabled && config.design == 0 && amount == 1) {
- LorenzUtils.chat("§6§lTROPHY FISH! §c§lFIRST §r$displayRarity $displayName")
+ LorenzUtils.chat("§6§lTROPHY FISH! §c§lFIRST §r$displayRarity $displayName", prefix = false)
return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt
index 1d84eae92..b9c3520ae 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt
@@ -99,7 +99,7 @@ class AnitaMedalProfit {
for (rawItemName in requiredItems) {
val pair = ItemUtils.readItemAmount(rawItemName)
if (pair == null) {
- LorenzUtils.error("§c[SkyHanni] Could not read item '$rawItemName'")
+ LorenzUtils.error("Could not read item '$rawItemName'")
continue
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
index d6450e2d7..044d38a77 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
@@ -160,7 +160,7 @@ object GardenAPI {
storage?.cropsPerSecond?.clear()
GardenBestCropTime.reset()
updateGardenTool()
- LorenzUtils.chat("§e[SkyHanni] Manually reset all crop speed data!")
+ LorenzUtils.chat("Manually reset all crop speed data!")
}
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt
index c60fd5086..f6c235cc1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt
@@ -82,7 +82,7 @@ class GardenCropMilestoneFix {
crop.setCounter(tabListValue)
GardenCropMilestoneDisplay.update()
if (!loadedCrops.contains(crop)) {
- LorenzUtils.chat("§e[SkyHanni] Loaded ${crop.cropName} milestone data from $source!")
+ LorenzUtils.chat("Loaded ${crop.cropName} milestone data from $source!")
loadedCrops.add(crop)
}
} else if (diff >= minDiff) {
@@ -91,4 +91,4 @@ class GardenCropMilestoneFix {
GardenCropMilestoneDisplay.update()
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt
index 228f133e9..92a01c7fb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt
@@ -16,12 +16,12 @@ object GardenCropTimeCommand {
fun onCommand(args: Array<String>) {
if (!config.display) {
- LorenzUtils.chat("§c[SkyHanni] §cshcroptime requires 'Show money per Hour' feature to be enabled to work!")
+ LorenzUtils.userError("shcroptime requires 'Show money per Hour' feature to be enabled to work!")
return
}
if (args.size < 2) {
- LorenzUtils.chat("§cUsage: /shcroptime <amount> <item>")
+ LorenzUtils.userError("Usage: /shcroptime <amount> <item>")
return
}
@@ -29,7 +29,7 @@ object GardenCropTimeCommand {
val amount = try {
rawAmount.toInt()
} catch (e: NumberFormatException) {
- LorenzUtils.chat("§cNot a valid number: '$rawAmount'")
+ LorenzUtils.userError("Not a valid number: '$rawAmount'")
return
}
@@ -64,10 +64,10 @@ object GardenCropTimeCommand {
}
if (map.isEmpty()) {
- LorenzUtils.chat("§c[SkyHanni] §cNo crop item found for '$rawSearchName'")
+ LorenzUtils.error("No crop item found for '$rawSearchName'.")
return
}
- LorenzUtils.chat("§e[SkyHanni] Crop Speed for ${map.size} items:\n" + map.sorted().keys.joinToString("\n"))
+ LorenzUtils.chat("Crop Speed for ${map.size} items:\n" + map.sorted().keys.joinToString("\n"))
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt
index d033255d2..50cf6b758 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt
@@ -49,7 +49,8 @@ class GardenLevelDisplay {
LorenzUtils.clickableChat(
" \n§b§lGARDEN LEVEL UP §8$oldLevel ➜ §b$newLevel\n" +
" §8+§aRespect from Elite Farmers and SkyHanni members :)\n ",
- "/gardenlevels"
+ "/gardenlevels",
+ false
)
}
}
@@ -118,4 +119,4 @@ class GardenLevelDisplay {
event.move(3, "garden.gardenLevelDisplay", "garden.gardenLevels.display")
event.move(3, "garden.gardenLevelPos", "garden.gardenLevels.pos")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
index af535615a..ef5d9a429 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
@@ -168,7 +168,7 @@ object GardenNextJacobContest {
sendContests()
} else {
LorenzUtils.clickableChat(
- "§e[SkyHanni] §2Click here to submit this years farming contests, thank you for helping everyone out!",
+ "§2Click here to submit this years farming contests, thank you for helping everyone out!",
"shsendcontests"
)
}
@@ -217,7 +217,7 @@ object GardenNextJacobContest {
if (array[0] == "enable") {
config.shareAutomatically = 1
SkyHanniMod.feature.storage.contestSendingAsked = true
- LorenzUtils.chat("§e[SkyHanni] §2Enabled automatic sharing of future contests!")
+ LorenzUtils.chat("§2Enabled automatic sharing of future contests!")
}
return
}
@@ -226,7 +226,7 @@ object GardenNextJacobContest {
}
if (!SkyHanniMod.feature.storage.contestSendingAsked && config.shareAutomatically == 0) {
LorenzUtils.clickableChat(
- "§e[SkyHanni] §2Click here to automatically share future contests!",
+ "§2Click here to automatically share future contests!",
"shsendcontests enable"
)
}
@@ -318,7 +318,7 @@ object GardenNextJacobContest {
lastWarningTime = System.currentTimeMillis() + 60_000 * 40
val cropText = crops.joinToString("§7, ") { "§a${it.cropName}" }
- LorenzUtils.chat("§e[SkyHanni] Next farming contest: $cropText")
+ LorenzUtils.chat("Next farming contest: $cropText")
LorenzUtils.sendTitle("§eFarming Contest!", 5.seconds)
SoundUtils.playBeepSound()
@@ -439,11 +439,11 @@ object GardenNextJacobContest {
newContests[timestamp + contestDuration] = FarmingContest(timestamp + contestDuration, crops)
}
} else {
- LorenzUtils.chat("§e[SkyHanni] This years contests aren't available to fetch automatically yet, please load them from your calender or wait 10 minutes!")
+ LorenzUtils.chat("This years contests aren't available to fetch automatically yet, please load them from your calender or wait 10 minutes!")
}
if (newContests.count() == maxContestsPerYear) {
- LorenzUtils.chat("§e[SkyHanni] Successfully loaded this year's contests from elitebot.dev automatically!")
+ LorenzUtils.chat("Successfully loaded this year's contests from elitebot.dev automatically!")
contests = newContests
fetchedFromElite = true
@@ -454,7 +454,7 @@ object GardenNextJacobContest {
}
} catch (e: Exception) {
e.printStackTrace()
- LorenzUtils.error("[SkyHanni] Failed to fetch upcoming contests. Please report this error if it continues to occur.")
+ LorenzUtils.error("Failed to fetch upcoming contests. Please report this error if it continues to occur.")
}
}
@@ -484,13 +484,13 @@ object GardenNextJacobContest {
val result = withContext(dispatcher) { APIUtil.postJSONIsSuccessful(url, body) }
if (result) {
- LorenzUtils.chat("§e[SkyHanni] Successfully submitted this years upcoming contests, thank you for helping everyone out!")
+ LorenzUtils.chat("Successfully submitted this years upcoming contests, thank you for helping everyone out!")
} else {
- LorenzUtils.error("[SkyHanni] Something went wrong submitting upcoming contests!")
+ LorenzUtils.error("Something went wrong submitting upcoming contests!")
}
} catch (e: Exception) {
e.printStackTrace()
- LorenzUtils.error("[SkyHanni] Failed to submit upcoming contests. Please report this error if it continues to occur.")
+ LorenzUtils.error("Failed to submit upcoming contests. Please report this error if it continues to occur.")
null
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
index bff6d4b0e..967368915 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
@@ -105,7 +105,7 @@ class GardenOptimalSpeed {
lastWarnTime = System.currentTimeMillis()
LorenzUtils.sendTitle("§cWrong speed!", 3.seconds)
cropInHand?.let {
- LorenzUtils.chat("§e[SkyHanni] Wrong speed for ${it.cropName}: §f$currentSpeed §e(§f$optimalSpeed §eis optimal)")
+ LorenzUtils.chat("Wrong speed for ${it.cropName}: §f$currentSpeed §e(§f$optimalSpeed §eis optimal)")
}
}
@@ -130,4 +130,4 @@ class GardenOptimalSpeed {
event.move(3, "garden.optimalSpeedCustom.cactus", "garden.optimalSpeeds.customSpeed.cactus")
event.move(3, "garden.optimalSpeedCustom.mushroom", "garden.optimalSpeeds.customSpeed.mushroom")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
index 439b51b0c..2e089364c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
@@ -145,7 +145,7 @@ class ComposterDisplay {
if (config.notifyLow.title) {
LorenzUtils.sendTitle("§cYour Organic Matter is low", 4.seconds)
}
- LorenzUtils.chat("§e[SkyHanni] §cYour Organic Matter is low!")
+ LorenzUtils.chat("§cYour Organic Matter is low!")
storage.informedAboutLowMatter = System.currentTimeMillis() + 60_000 * 5
}
@@ -155,7 +155,7 @@ class ComposterDisplay {
if (config.notifyLow.title) {
LorenzUtils.sendTitle("§cYour Fuel is low", 4.seconds)
}
- LorenzUtils.chat("§e[SkyHanni] §cYour Fuel is low!")
+ LorenzUtils.chat("§cYour Fuel is low!")
storage.informedAboutLowFuel = System.currentTimeMillis() + 60_000 * 5
}
}
@@ -202,7 +202,7 @@ class ComposterDisplay {
if (System.currentTimeMillis() < storage.lastComposterEmptyWarningTime + 1000 * 60 * 2) return
storage.lastComposterEmptyWarningTime = System.currentTimeMillis()
- LorenzUtils.chat("§e[SkyHanni] $warningMessage")
+ LorenzUtils.chat(warningMessage)
LorenzUtils.sendTitle("§eComposter Warning!", 3.seconds)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
index 557fec6d0..b99f059da 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
@@ -87,11 +87,11 @@ object ComposterOverlay {
fun onCommand(args: Array<String>) {
if (args.size != 1) {
- LorenzUtils.chat("§cUsage: /shtestcomposter <offset>")
+ LorenzUtils.userError("Usage: /shtestcomposter <offset>")
return
}
testOffset = args[0].toInt()
- LorenzUtils.chat("§e[SkyHanni] Composter test offset set to $testOffset.")
+ LorenzUtils.chat("Composter test offset set to $testOffset.")
}
@SubscribeEvent
@@ -382,7 +382,7 @@ object ComposterOverlay {
}
val testOffset = if (testOffset_ > map.size) {
- LorenzUtils.chat("§cSkyHanni] Invalid Composter Overlay Offset! $testOffset cannot be greater than ${map.size}!")
+ LorenzUtils.error("Invalid Composter Overlay Offset! $testOffset cannot be greater than ${map.size}!")
ComposterOverlay.testOffset = 0
0
} else testOffset_
@@ -449,7 +449,7 @@ object ComposterOverlay {
}
val having = InventoryUtils.countItemsInLowerInventory { it.getInternalName_old() == internalName }
if (having >= itemsNeeded) {
- LorenzUtils.chat("§e[SkyHanni] $itemName §8x${itemsNeeded} §ealready found in inventory!")
+ LorenzUtils.chat("$itemName §8x${itemsNeeded} §ealready found in inventory!")
return
}
@@ -463,16 +463,16 @@ object ComposterOverlay {
val sackType = if (internalName == "VOLTA" || internalName == "OIL_BARREL") "Mining"
else "Enchanted Agronomy"
LorenzUtils.clickableChat(
- "§e[SkyHanni] Sacks could not be loaded. Click here and open your §9$sackType Sack §eto update the data!",
+ "Sacks could not be loaded. Click here and open your §9$sackType Sack §eto update the data!",
"sax"
)
return
} else if (amountInSacks == 0L) {
SoundUtils.playErrorSound()
if (LorenzUtils.noTradeMode) {
- LorenzUtils.chat("§e[SkyHanni] No $itemName §efound in sacks.")
+ LorenzUtils.chat("No $itemName §efound in sacks.")
} else {
- LorenzUtils.chat("§e[SkyHanni] No $itemName §efound in sacks. Opening Bazaar.")
+ LorenzUtils.chat("No $itemName §efound in sacks. Opening Bazaar.")
BazaarApi.searchForBazaarItem(itemName, itemsNeeded)
}
return
@@ -481,10 +481,10 @@ object ComposterOverlay {
LorenzUtils.sendCommandToServer("gfs $internalName ${itemsNeeded - having}")
if (amountInSacks <= itemsNeeded - having) {
if (LorenzUtils.noTradeMode) {
- LorenzUtils.chat("§e[SkyHanni] You're out of $itemName §ein your sacks!")
+ LorenzUtils.chat("You're out of $itemName §ein your sacks!")
} else {
LorenzUtils.clickableChat(
- "§e[SkyHanni] You're out of $itemName §ein your sacks! Click here to buy more on the Bazaar!",
+ "You're out of $itemName §ein your sacks! Click here to buy more on the Bazaar!",
"bz ${itemName.removeColor()}"
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt
index 695092598..be6672d78 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt
@@ -48,14 +48,14 @@ class GardenComposterInventoryFeatures {
if (line == "") break
val pair = ItemUtils.readItemAmount(line)
if (pair == null) {
- LorenzUtils.error("§c[SkyHanni] Could not read item '$line'")
+ LorenzUtils.error("Could not read item '$line'")
continue
}
val (itemName, amount) = pair
val internalName = NEUItems.getInternalNameOrNull(itemName)
if (internalName == null) {
- LorenzUtils.chat(
- "§c[SkyHanni] Error reading internal name for item '$itemName§c' " +
+ LorenzUtils.error(
+ "Error reading internal name for item '$itemName§c' " +
"(in GardenComposterInventoryFeatures)"
)
continue
@@ -102,4 +102,4 @@ class GardenComposterInventoryFeatures {
event.move(3, "garden.composterUpgradePrice", "garden.composters.upgradePrice")
event.move(3, "garden.composterHighLightUpgrade", "garden.composters.highlightUpgrade")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt
index 50a46b1e2..faa2ed534 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestStatsSummary.kt
@@ -32,7 +32,7 @@ class JacobContestStatsSummary {
when (event.phase) {
FarmingContestPhase.START -> {
- LorenzUtils.chat("§e[SkyHanni] Started tracking your Jacob Contest Blocks Per Second!")
+ LorenzUtils.chat("Started tracking your Jacob Contest Blocks Per Second!")
startTime = System.currentTimeMillis()
}
@@ -41,16 +41,16 @@ class JacobContestStatsSummary {
val durationInSeconds = duration.toDouble() / 1000
val blocksPerSecond = (blocksBroken.toDouble() / durationInSeconds).round(2)
val cropName = event.crop.cropName
- LorenzUtils.chat("§e[SkyHanni] Stats for $cropName Contest:")
+ LorenzUtils.chat("Stats for $cropName Contest:")
val time = TimeUtils.formatDuration(duration - 999)
- LorenzUtils.chat("§e[SkyHanni] §7Blocks Broken in total: §e${blocksBroken.addSeparators()}")
+ LorenzUtils.chat("§7Blocks Broken in total: §e${blocksBroken.addSeparators()}")
val color = getBlocksPerSecondColor(blocksPerSecond)
- LorenzUtils.chat("§e[SkyHanni] §7Average Blocks Per Second: $color$blocksPerSecond")
- LorenzUtils.chat("§e[SkyHanni] §7Participated for §b$time")
+ LorenzUtils.chat("§7Average Blocks Per Second: $color$blocksPerSecond")
+ LorenzUtils.chat("§7Participated for §b$time")
}
FarmingContestPhase.CHANGE -> {
- LorenzUtils.chat("§e[SkyHanni] You changed the crop during the contest, resetting the Blocks Per Second calculation..")
+ LorenzUtils.chat("You changed the crop during the contest, resetting the Blocks Per Second calculation..")
startTime = System.currentTimeMillis()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
index 91abf10a4..b63b02f27 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
@@ -45,7 +45,7 @@ object CropMoneyDisplay {
fun toggleShowCalculation() {
showCalculation = !showCalculation
- LorenzUtils.chat("§e[SkyHanni] Show crop money calculation: " + if (showCalculation) "enabled" else "disabled")
+ LorenzUtils.chat("Show crop money calculation: " + if (showCalculation) "enabled" else "disabled")
update()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt
index 8abe65ccf..fd337a361 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt
@@ -118,7 +118,7 @@ class CropSpeedMeter {
fun toggle() {
enabled = !enabled
- LorenzUtils.chat("§e[SkyHanni] Crop Speed Meter " + if (enabled) "§aEnabled" else "§cDisabled")
+ LorenzUtils.chat("Crop Speed Meter " + if (enabled) "§aEnabled" else "§cDisabled")
startCrops = emptyMap()
}
@@ -132,4 +132,4 @@ class CropSpeedMeter {
}
fun isEnabled() = enabled && GardenAPI.inGarden()
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
index 41976bf07..f32da7867 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
@@ -224,8 +224,8 @@ class FarmingWeightDisplay {
// Check that the provided string is valid
val parsed = value.toIntOrNull() ?: 0
if (parsed < 1 || parsed > goal) {
- LorenzUtils.error("[SkyHanni] Invalid Farming Weight Overtake Goal!")
- LorenzUtils.chat("§eEdit the Overtake Goal config value with a valid number [1-10000] to use this feature!")
+ LorenzUtils.error("Invalid Farming Weight Overtake Goal!")
+ LorenzUtils.chat("§eEdit the Overtake Goal config value with a valid number [1-10000] to use this feature!", false)
config.ETAGoalRank = goal.toString()
} else {
goal = parsed
@@ -255,7 +255,7 @@ class FarmingWeightDisplay {
if (weightUntilOvertake < 0) {
if (weightPerSecond > 0) {
- farmingChatMessage("§e[SkyHanni] You passed §b$nextName §ein the Farming Weight Leaderboard!")
+ farmingChatMessage("You passed §b$nextName §ein the Farming Weight Leaderboard!")
}
// Lower leaderboard position
@@ -386,7 +386,7 @@ class FarmingWeightDisplay {
private fun chatOffScreenChange(direction: String, oldPosition: Int) {
farmingChatMessage(
- "§e[SkyHanni] §7Since your last visit to the §aGarden§7, " +
+ "§7Since your last visit to the §aGarden§7, " +
"you have $direction §7on the §dFarming Leaderboard§7. " +
"§7(§e#${oldPosition.addSeparators()} §7-> §e#${leaderboardPosition.addSeparators()}§7)"
)
@@ -463,8 +463,11 @@ class FarmingWeightDisplay {
private fun error() {
apiError = true
- LorenzUtils.error("[SkyHanni] Loading the farming weight data from elitebot.dev failed!")
- LorenzUtils.chat("§eYou can re-enter the garden to try to fix the problem. If this message repeats, please report it on Discord!")
+ LorenzUtils.error(
+ "Loading the farming weight data from elitebot.dev failed!\n"
+ + "§eYou can re-enter the garden to try to fix the problem.\n" +
+ "§cIf this message repeats, please report it on Discord!",
+ )
}
private fun calculateCollectionWeight(): MutableMap<CropType, Double> {
@@ -505,7 +508,7 @@ class FarmingWeightDisplay {
private fun openWebsite(name: String?) {
OSUtils.openBrowser("https://elitebot.dev/@$name/")
- LorenzUtils.chat("§e[SkyHanni] Opening Farming Profile of player §b$name")
+ LorenzUtils.chat("Opening Farming Profile of player §b$name")
}
private val factorPerCrop = mutableMapOf<CropType, Double>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
index d2948b105..89a5e6a16 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
@@ -108,7 +108,7 @@ object GardenCropMilestoneDisplay {
}
cultivatingData[crop] = counter
} catch (e: Throwable) {
- LorenzUtils.error("[SkyHanni] Error in OwnInventoryItemUpdateEvent")
+ LorenzUtils.error("Error in OwnInventoryItemUpdateEvent")
e.printStackTrace()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt
index 9452dc82f..3384af51e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt
@@ -15,31 +15,32 @@ object GardenStartLocation {
fun setLocationCommand() {
if (!GardenAPI.inGarden()) {
- LorenzUtils.chat("§c[SkyHanni] This Command only works in the garden!")
+ LorenzUtils.userError("This Command only works in the garden!")
return
}
if (!SkyHanniMod.feature.garden.cropStartLocation.enabled) {
LorenzUtils.clickableChat(
- "§c[SkyHanni] This feature is disabled. Enable it in the config: §e/sh crop start location",
- "sh crop start location"
+ "This feature is disabled. Enable it in the config: §e/sh crop start location",
+ "sh crop start location",
+ prefixColor = "§c"
)
return
}
val startLocations = GardenAPI.storage?.cropStartLocations
if (startLocations == null) {
- LorenzUtils.chat("§c[SkyHanni] The config is not yet loaded, retry in a second.")
+ LorenzUtils.userError("The config is not yet loaded, retry in a second.")
return
}
val crop = GardenAPI.getCurrentlyFarmedCrop()
if (crop == null) {
- LorenzUtils.chat("§c[SkyHanni] Hold a crop specific farming tool in the hand!")
+ LorenzUtils.userError("Hold a crop specific farming tool in the hand!")
return
}
startLocations[crop] = LocationUtils.playerLocation()
- LorenzUtils.chat("§e[SkyHanni] You changed your Crop Start Location for ${crop.cropName}!")
+ LorenzUtils.chat("You changed your Crop Start Location for ${crop.cropName}!")
}
@SubscribeEvent
@@ -51,7 +52,7 @@ object GardenStartLocation {
if (!startLocations.contains(crop)) {
startLocations[crop] = LocationUtils.playerLocation()
- LorenzUtils.chat("§e[SkyHanni] Auto updated your Crop Start Location for ${crop.cropName}")
+ LorenzUtils.chat("Auto updated your Crop Start Location for ${crop.cropName}")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
index 2f65a9906..20ce1a1b3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
@@ -40,10 +40,10 @@ class WildStrawberryDyeNotification {
if (internalName == item) {
val name = event.itemStack.name!!
LorenzUtils.sendTitle(name, 5.seconds)
- LorenzUtils.chat("§e[SkyHanni] You found a $name§e!")
+ LorenzUtils.chat("You found a $name§e!")
SoundUtils.playBeepSound()
ItemBlink.setBlink(NEUItems.getItemStackOrNull("DYE_WILD_STRAWBERRY"), 5_000)
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
index c4f311941..483cce5a5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
@@ -82,13 +82,13 @@ class CaptureFarmingGear {
fun reverseCarrotFortune() {
val storage = GardenAPI.storage?.fortune ?: return
storage.carrotFortune = !storage.carrotFortune
- LorenzUtils.chat("§2Toggled exportable carrot fortune to: ${storage.carrotFortune}")
+ LorenzUtils.chat("Toggled exportable carrot fortune to: ${storage.carrotFortune}")
}
fun reversePumpkinFortune() {
val storage = GardenAPI.storage?.fortune ?: return
storage.pumpkinFortune = !storage.pumpkinFortune
- LorenzUtils.chat("§2Toggled expired pumpkin fortune to: ${storage.pumpkinFortune}")
+ LorenzUtils.chat("Toggled expired pumpkin fortune to: ${storage.pumpkinFortune}")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenNextPlotPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenNextPlotPrice.kt
index 5ad1f9769..64d176bcd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenNextPlotPrice.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenNextPlotPrice.kt
@@ -35,17 +35,18 @@ class GardenNextPlotPrice {
}
if (next) {
- ItemUtils.readItemAmount(line)?.let {
+ val readItemAmount = ItemUtils.readItemAmount(line)
+ readItemAmount?.let {
val (itemName, amount) = it
val lowestBin = NEUItems.getPrice(NEUItems.getRawInternalName(itemName))
val price = lowestBin * amount
val format = NumberUtil.format(price)
list[i] = list[i] + " §7(§6$format§7)"
} ?: {
- LorenzUtils.error("§c[SkyHanni] Could not read item '$line'")
+ LorenzUtils.error("Could not read item '$line'")
}
break
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt
index eb4f31176..cdd5d4358 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt
@@ -1,6 +1,5 @@
package at.hannibal2.skyhanni.features.garden.inventory
-
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
@@ -8,7 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
-import at.hannibal2.skyhanni.utils.LorenzUtils.chat
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent
import io.github.moulberry.notenoughupdates.events.SlotClickEvent
@@ -30,7 +29,8 @@ object GardenPlotIcon {
private var originalStack = mutableMapOf<Int, ItemStack>()
private var cachedStack = mutableMapOf<Int, ItemStack>()
private val editStack = ItemStack(Items.wooden_axe)
- private val whitelistedSlot = listOf(2, 3, 4, 5, 6, 11, 12, 13, 14, 15, 20, 21, 23, 24, 29, 30, 31, 32, 33, 38, 39, 40, 41, 42)
+ private val whitelistedSlot =
+ listOf(2, 3, 4, 5, 6, 11, 12, 13, 14, 15, 20, 21, 23, 24, 29, 30, 31, 32, 33, 38, 39, 40, 41, 42)
var hardReset = false
@@ -104,9 +104,9 @@ object GardenPlotIcon {
if (editMode != 0) {
if (event.slotId in 54..89) {
event.isCanceled = true
- if (event.slot.stack == null) return
- copyStack = event.slot.stack
- chat("§6§lClick an item in the desk menu to replace it with that item!")
+ copyStack = event.slot.stack ?: return
+ // TODO different format, not bold or show not in chat at all.
+ LorenzUtils.chat("§6§lClick an item in the desk menu to replace it with that item!")
return
}
if (event.slotId != 53) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index 135a98459..4d492dc79 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -85,7 +85,7 @@ class GardenVisitorFeatures {
val pair = ItemUtils.readItemAmount(line)
if (pair == null) {
- LorenzUtils.error("§c[SkyHanni] Could not read item '$line'")
+ LorenzUtils.error("Could not read item '$line'")
continue
}
val (itemName, amount) = pair
@@ -269,7 +269,7 @@ class GardenVisitorFeatures {
if (visitor.lastLore.isEmpty()) {
readToolTip(visitor, event.itemStack)
- LorenzUtils.chat("§e[SkyHanni] Reloaded the visitor data of that inventory, this should not happen.")
+ LorenzUtils.error("Reloaded the visitor data of that inventory, this should not happen.")
}
toolTip.addAll(visitor.lastLore)
@@ -310,7 +310,7 @@ class GardenVisitorFeatures {
if (wasEmpty) {
visitor.hasReward()?.let { reward ->
if (config.rewardWarning.notifyInChat) {
- LorenzUtils.chat("§e[SkyHanni] Found Visitor Reward ${reward.displayName}§e!")
+ LorenzUtils.chat("Found Visitor Reward ${reward.displayName}§e!")
}
}
}
@@ -400,7 +400,7 @@ class GardenVisitorFeatures {
}
if (config.notificationChat) {
val displayName = GardenVisitorColorNames.getColoredName(name)
- LorenzUtils.chat("§e[SkyHanni] $displayName §eis visiting your garden!")
+ LorenzUtils.chat("$displayName §eis visiting your garden!")
}
if (System.currentTimeMillis() > LorenzUtils.lastWorldSwitch + 2_000) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
index b854c6f7b..47fabca37 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt
@@ -142,7 +142,7 @@ class GardenVisitorTimer {
}
if (lastMillis == Duration.INFINITE) {
- LorenzUtils.chat("§c[SkyHanni] Found Visitor Timer bug, reset value (lastMillis was infinite).")
+ LorenzUtils.error("Found Visitor Timer bug, reset value (lastMillis was infinite).")
lastMillis = 0.seconds
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
index d516695a2..026d263ee 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt
@@ -97,7 +97,7 @@ class HighlightVisitorsOutsideOfGarden {
event.isCanceled = true
if (packet.action == C02PacketUseEntity.Action.INTERACT) {
LorenzUtils.clickableChat(
- "§e[SkyHanni] Blocked you from interacting with a visitor. Sneak to bypass or click here to change settings.",
+ "Blocked you from interacting with a visitor. Sneak to bypass or click here to change settings.",
"/sh block interacting with visitors"
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
index c2ed7d51b..55323ef57 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
@@ -137,15 +137,16 @@ class VisitorListener {
visitor.hasReward()?.let {
if (config.rewardWarning.preventRefusing) {
if (config.rewardWarning.bypassKey.isKeyHeld()) {
- LorenzUtils.chat("§e[SkyHanni] §cBypassed blocking refusal of visitor ${visitor.visitorName} §7(${it.displayName}§7)")
+ LorenzUtils.chat("§cBypassed blocking refusal of visitor ${visitor.visitorName} §7(${it.displayName}§7)")
return
}
event.isCanceled = true
- LorenzUtils.chat("§e[SkyHanni] §cBlocked refusing visitor ${visitor.visitorName} §7(${it.displayName}§7)")
+ LorenzUtils.chat("§cBlocked refusing visitor ${visitor.visitorName} §7(${it.displayName}§7)")
if (config.rewardWarning.bypassKey == Keyboard.KEY_NONE) {
LorenzUtils.clickableChat(
"§eIf you want to deny this visitor, set a keybind in §e/sh bypass",
- "sh bypass"
+ "sh bypass",
+ false
)
}
Minecraft.getMinecraft().thePlayer.closeScreen()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt
index ddb4645d6..a8880aefd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt
@@ -127,7 +127,7 @@ class HideNotClickableItems {
event.toolTip.add("")
if (hideReason == "") {
event.toolTip.add("§4No hide reason!")
- LorenzUtils.warning("No hide reason for not clickable item!")
+ LorenzUtils.error("No hide reason for not clickable item!")
} else {
event.toolTip.add("§c$hideReason")
if (config.itemsBypass) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt
index 7c50ec1a0..4d648c16c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayHelper.kt
@@ -71,7 +71,7 @@ class TiaRelayHelper {
val name = sounds.values.first().name
for (sound in sounds.toMutableMap()) {
if (sound.value.name != name) {
- LorenzUtils.chat("§c[SkyHanni] Tia Relay Helper error: Too much background noise! Please try again.")
+ LorenzUtils.error("Tia Relay Helper error: Too much background noise! Please try again.")
sounds.clear()
return
}
@@ -143,4 +143,4 @@ class TiaRelayHelper {
}
class Sound(val name: String, val pitch: Float)
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
index e9fc47dca..501ae420e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
@@ -37,7 +37,7 @@ class KingTalismanHelper {
fun kingFix() {
currentOffset = null
- LorenzUtils.chat("§e[SkyHanni] Reset internal offset of King Talisman Helper.")
+ LorenzUtils.chat("Reset internal offset of King Talisman Helper.")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
index f4853961c..9eab0fdde 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
@@ -336,7 +336,7 @@ class MinionFeatures {
fun clearMinionData() {
minions = mutableMapOf()
- LorenzUtils.chat("§e[SkyHanni] Manually reset all private island minion location data!")
+ LorenzUtils.chat("Manually reset all private island minion location data!")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt
index ebc00c989..1ddcb40e7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt
@@ -39,32 +39,32 @@ class CollectionTracker {
fun command(args: Array<String>) {
if (args.isEmpty()) {
if (internalName == null) {
- LorenzUtils.chat("§c/shtrackcollection <item name>")
+ LorenzUtils.userError("/shtrackcollection <item name>")
return
}
- LorenzUtils.chat("§e[SkyHanni] Stopped collection tracker.")
+ LorenzUtils.chat("Stopped collection tracker.")
resetData()
return
}
val rawName = fixTypo(args.joinToString(" ").lowercase().replace("_", " "))
if (rawName == "gemstone") {
- LorenzUtils.chat("§c[SkyHanni] Gemstone collection is not supported!")
+ LorenzUtils.userError("Gemstone collection is not supported!")
return
} else if (rawName == "mushroom") {
- LorenzUtils.chat("§c[SkyHanni] Mushroom collection is not supported!")
+ LorenzUtils.userError("Mushroom collection is not supported!")
return
}
val foundInternalName = NEUItems.getInternalNameOrNullIgnoreCase(rawName)
if (foundInternalName == null) {
- LorenzUtils.chat("§c[SkyHanni] Item '$rawName' does not exist!")
+ LorenzUtils.error("Item '$rawName' does not exist!")
return
}
val stack = foundInternalName.getItemStackOrNull()
if (stack == null) {
- LorenzUtils.chat("§c[SkyHanni] Item '$rawName' does not exist!")
+ LorenzUtils.error("Item '$rawName' does not exist!")
return
}
setNewCollection(foundInternalName, stack.name!!.removeColor())
@@ -97,7 +97,7 @@ class CollectionTracker {
private fun setNewCollection(internalName: NEUInternalName, name: String) {
val foundAmount = CollectionAPI.getCollectionCounter(internalName)
if (foundAmount == null) {
- LorenzUtils.chat("§c[SkyHanni] $name collection not found. Try to open the collection inventory!")
+ LorenzUtils.userError("$name collection not found. Try to open the collection inventory!")
return
}
this.internalName = internalName
@@ -106,7 +106,7 @@ class CollectionTracker {
lastAmountInInventory = countCurrentlyInInventory()
updateDisplay()
- LorenzUtils.chat("§e[SkyHanni] Started tracking $itemName §ecollection.")
+ LorenzUtils.chat("Started tracking $itemName §ecollection.")
}
private fun resetData() {
@@ -201,4 +201,4 @@ class CollectionTracker {
SkyHanniMod.feature.misc.collectionCounterPos.renderStringsAndItems(display, posLabel = "Collection Tracker")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt
index eb658b865..dbc3725bf 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt
@@ -42,7 +42,7 @@ class FandomWikiFromMenus {
val inWikiInventory = // TODO better name for this inventory
event.slotId == 11 && itemClickedName.contains("Wiki Command") && chestName.contains("Wiki")
if ((itemInHandName == "") || inWikiInventory) {
- LorenzUtils.clickableChat("§e[SkyHanni] Click here to visit the Hypixel Skyblock Fandom Wiki!", "wiki")
+ LorenzUtils.clickableChat("Click here to visit the Hypixel Skyblock Fandom Wiki!", "wiki")
return
}
@@ -65,11 +65,11 @@ class FandomWikiFromMenus {
if (!config.skipWikiChat) {
LorenzUtils.clickableChat(
- "§e[SkyHanni] Click here to search for $wikiDisplayName §eon the Hypixel Skyblock Fandom Wiki!",
+ "Click here to search for $wikiDisplayName §eon the Hypixel Skyblock Fandom Wiki!",
"wiki $wikiInternalName"
)
} else {
- LorenzUtils.chat("§e[SkyHanni] Searching the Fandom Wiki for §a$wikiDisplayName")
+ LorenzUtils.chat("Searching the Fandom Wiki for §a$wikiDisplayName")
val wikiUrlCustom = "${WikiManager.urlSearchPrefix}$wikiInternalName&scope=internal"
OSUtils.openBrowser(wikiUrlCustom.replace(' ', '+'))
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt
index 7afbf475c..8f3920844 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt
@@ -20,7 +20,7 @@ class FixNEUHeavyPearls {
if (change.internalName == heavyPearl && change.delta == 3) {
val specific = NotEnoughUpdates.INSTANCE.config.getProfileSpecific()
if (System.currentTimeMillis() > specific.dailyHeavyPearlCompleted + 1.hours.inWholeMilliseconds) {
- LorenzUtils.chat("§e[SkyHanni] Mark NEU Heavy Pearls as done.")
+ LorenzUtils.chat("Mark NEU Heavy Pearls as done.")
specific.dailyHeavyPearlCompleted = System.currentTimeMillis()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt
index 8b7114127..4064ed341 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt
@@ -24,13 +24,13 @@ class JoinCrystalHollows {
if (message == "§cYou do not have an active Crystal Hollows pass!") {
lastWrongPassTime = System.currentTimeMillis()
if (LorenzUtils.skyBlockIsland != IslandType.DWARVEN_MINES) {
- LorenzUtils.clickableChat("§e[SkyHanni] Click here to warp to Dwarven Mines!", "warp mines")
+ LorenzUtils.clickableChat("Click here to warp to Dwarven Mines!", "warp mines")
} else {
- LorenzUtils.chat("§e[SkyHanni] Buy a §2Crystal Hollows Pass §efrom §5Gwendolyn")
+ LorenzUtils.chat("Buy a §2Crystal Hollows Pass §efrom §5Gwendolyn")
}
}
if (message == "§e[NPC] §5Gwendolyn§f: §rGreat! Now hop on into the Minecart and I'll get you on your way!" && inTime()) {
- LorenzUtils.clickableChat("§e[SkyHanni] Click here to warp to Crystal Hollows!", "warp ch")
+ LorenzUtils.clickableChat("Click here to warp to Crystal Hollows!", "warp ch")
}
}
@@ -39,7 +39,7 @@ class JoinCrystalHollows {
if (!isEnabled()) return
if (event.newIsland == IslandType.DWARVEN_MINES && inTime()) {
- LorenzUtils.chat("§e[SkyHanni] Buy a §2Crystal Hollows Pass §efrom §5Gwendolyn§e!")
+ LorenzUtils.chat("Buy a §2Crystal Hollows Pass §efrom §5Gwendolyn§e!")
}
if (event.newIsland == IslandType.CRYSTAL_HOLLOWS) {
lastWrongPassTime = 0
@@ -62,4 +62,4 @@ class JoinCrystalHollows {
private fun inTime() = lastWrongPassTime + 1000 * 60 * 2 > System.currentTimeMillis()
fun isEnabled() = SkyHanniMod.feature.misc.crystalHollowsJoin
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt
index 4aed71557..cc88ae4d1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/LimboTimeTracker.kt
@@ -49,8 +49,8 @@ class LimboTimeTracker {
if (!isEnabled()) return
val passedSince = limboJoinTime.passedSince()
val duration = passedSince.format()
- LorenzUtils.run { chat("§e[SkyHanni] You left the limbo after §b$duration") }
+ LorenzUtils.run { chat("You left the limbo after §b$duration") }
}
fun isEnabled() = config.showTimeInLimbo
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt
index 4c51d3c3c..14b430d19 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt
@@ -19,7 +19,7 @@ object LockMouseLook {
val gameSettings = Minecraft.getMinecraft().gameSettings
if (gameSettings.mouseSensitivity == lockedPosition) {
gameSettings.mouseSensitivity = SkyHanniMod.feature.storage.savedMouseSensitivity
- LorenzUtils.chat("§e[SkyHanni] §bMouse rotation is now unlocked because you left it locked.")
+ LorenzUtils.chat("§bMouse rotation is now unlocked because you left it locked.")
}
}
@@ -31,12 +31,12 @@ object LockMouseLook {
SkyHanniMod.feature.storage.savedMouseSensitivity = gameSettings.mouseSensitivity
gameSettings.mouseSensitivity = lockedPosition
if (config.lockMouseLookChatMessage) {
- LorenzUtils.chat("§e[SkyHanni] §bMouse rotation is now locked. Type /shmouselock to unlock your rotation")
+ LorenzUtils.chat("§bMouse rotation is now locked. Type /shmouselock to unlock your rotation")
}
} else {
gameSettings.mouseSensitivity = SkyHanniMod.feature.storage.savedMouseSensitivity
if (config.lockMouseLookChatMessage) {
- LorenzUtils.chat("§e[SkyHanni] §bMouse rotation is now unlocked.")
+ LorenzUtils.chat("§bMouse rotation is now unlocked.")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt
index 94ba46efd..66e379747 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt
@@ -22,7 +22,7 @@ class MarkedPlayerManager {
fun command(args: Array<String>) {
if (args.size != 1) {
- LorenzUtils.chat("§cUsage: /shmarkplayer <name>")
+ LorenzUtils.userError("Usage: /shmarkplayer <name>")
return
}
@@ -31,18 +31,18 @@ class MarkedPlayerManager {
if (name == LorenzUtils.getPlayerName().lowercase()) {
- LorenzUtils.chat("§c[SkyHanni] You can't add or remove yourself this way! Go to the settings and toggle 'Mark your own name'.")
+ LorenzUtils.userError("You can't add or remove yourself this way! Go to the settings and toggle 'Mark your own name'.")
return
}
if (name !in playerNamesToMark) {
playerNamesToMark.add(name)
findPlayers()
- LorenzUtils.chat("§e[SkyHanni] §aMarked §eplayer §b$displayName§e!")
+ LorenzUtils.chat("§aMarked §eplayer §b$displayName§e!")
} else {
playerNamesToMark.remove(name)
markedPlayers.remove(name)
- LorenzUtils.chat("§e[SkyHanni] §cUnmarked §eplayer §b$displayName§e!")
+ LorenzUtils.chat("§cUnmarked §eplayer §b$displayName§e!")
}
}
@@ -119,4 +119,4 @@ class MarkedPlayerManager {
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt
index 2890e8593..e6ce5d8f9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt
@@ -152,7 +152,7 @@ object QuickModMenuSwitch {
} catch (_: Exception) {
}
}
- LorenzUtils.chat("§c[SkyHanni] Error trying to open the gui for mod " + mod.name + "!")
+ LorenzUtils.error("Error trying to open the gui for mod " + mod.name + "!")
}
"hytil" -> {
@@ -168,7 +168,7 @@ object QuickModMenuSwitch {
} catch (_: Exception) {
}
}
- LorenzUtils.chat("§c[SkyHanni] Error trying to open the gui for mod " + mod.name + "!")
+ LorenzUtils.chat("Error trying to open the gui for mod " + mod.name + "!")
}
else -> {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/SuperpairsClicksAlert.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/SuperpairsClicksAlert.kt
index c8882a1b8..f4da6126b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/SuperpairsClicksAlert.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/SuperpairsClicksAlert.kt
@@ -53,7 +53,7 @@ class SuperpairsClicksAlert {
.any { it.value.stackSize > roundsNeeded })
) {
SoundUtils.playBeepSound()
- LorenzUtils.chat("§e[SkyHanni] You have reached the maximum possible clicks!")
+ LorenzUtils.chat("You have reached the maximum possible clicks!")
roundsNeeded = -1
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt
index 31ad1cef8..e358b3f28 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt
@@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.LorenzKeyPressEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
+import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.onToggle
import at.hannibal2.skyhanni.utils.SimpleTimeMark
@@ -58,11 +59,11 @@ object DiscordRPCManager : IPCListener {
try {
client?.connect()
- if (fromCommand) LorenzUtils.chat("§a[SkyHanni] Successfully started Rich Presence!") // confirm that /shrpcstart worked
+ if (fromCommand) LorenzUtils.chat("Successfully started Rich Presence!", prefixColor = "§a") // confirm that /shrpcstart worked
} catch (ex: Exception) {
consoleLog("Warn: Failed to connect to RPC!")
consoleLog(ex.toString())
- LorenzUtils.clickableChat("§e[SkyHanni] Discord Rich Presence was unable to start! " +
+ LorenzUtils.clickableChat("Discord Rich Presence was unable to start! " +
"This usually happens when you join SkyBlock when Discord is not started. " +
"Please run /shrpcstart to retry once you have launched Discord.", "shrpcstart")
}
@@ -183,20 +184,23 @@ object DiscordRPCManager : IPCListener {
fun startCommand() {
if (!config.enabled.get()) {
- LorenzUtils.chat("§c[SkyHanni] Discord Rich Presence is disabled. Enable it in the config §e/sh discord")
+ LorenzUtils.userError("Discord Rich Presence is disabled. Enable it in the config §e/sh discord")
return
}
if (isActive()) {
- LorenzUtils.chat("§e[SkyHanni] Discord Rich Presence is already active!")
+ LorenzUtils.userError("Discord Rich Presence is already active!")
return
}
- LorenzUtils.chat("§e[SkyHanni] Attempting to start Discord Rich Presence...")
+ LorenzUtils.chat("Attempting to start Discord Rich Presence...")
try {
start(true)
} catch (e: Exception) {
- LorenzUtils.chat("§c[SkyHanni] Unable to start Discord Rich Presence! Please report this on Discord and ping @netheriteminer.")
+ ErrorManager.logError(
+ e,
+ "Unable to start Discord Rich Presence! Please report this on Discord and ping @netheriteminer."
+ )
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
index ddd6896d8..2565b2222 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
@@ -51,7 +51,7 @@ object EstimatedItemValue {
object : TypeToken<HashMap<NEUInternalName, HashMap<String, List<String>>>>() {}.type
)
else
- LorenzUtils.error("Gemstone Slot Unlock Costs failed to load")
+ LorenzUtils.error("Gemstone Slot Unlock Costs failed to load!")
}
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt
index 6c5be7ec9..1f153ed69 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt
@@ -33,7 +33,7 @@ object DefaultConfigFeatures {
if (!SkyHanniMod.feature.storage.hasPlayedBefore) {
SkyHanniMod.feature.storage.hasPlayedBefore = true
LorenzUtils.clickableChat(
- "§e[SkyHanni] Looks like this is the first time you are using SkyHanni. " +
+ "Looks like this is the first time you are using SkyHanni. " +
"Click here to configure default options, or run /shdefaultoptions.",
"shdefaultoptions"
)
@@ -41,8 +41,8 @@ object DefaultConfigFeatures {
val lastVersion = knownToggles.keys.last { it != SkyHanniMod.version }
val command = "/shdefaultoptions $lastVersion ${SkyHanniMod.version}"
LorenzUtils.clickableChat(
- "§e[SkyHanni] Looks like you updated SkyHanni. " +
- "Click here to configure the newly introduced options, or run $command.",
+ "Looks like you updated SkyHanni. " +
+ "Click here to configure the newly introduced options, or run $command.",
command
)
}
@@ -55,12 +55,12 @@ object DefaultConfigFeatures {
val knownToggles = SkyHanniMod.knownFeaturesData.knownFeatures
val togglesInNewVersion = knownToggles[new]
if (new != "null" && togglesInNewVersion == null) {
- LorenzUtils.chat("§e[SkyHanni] Unknown version $new")
+ LorenzUtils.chat("Unknown version $new")
return
}
val togglesInOldVersion = knownToggles[old]
if (old != "null" && togglesInOldVersion == null) {
- LorenzUtils.chat("§e[SkyHanni] Unknown version $old")
+ LorenzUtils.chat("Unknown version $old")
return
}
optionList = optionList
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt
index 84362576c..ab32d9aa7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt
@@ -96,7 +96,7 @@ object UpdateManager {
if (it.isUpdateAvailable) {
updateState = UpdateState.AVAILABLE
LorenzUtils.clickableChat(
- "§e[SkyHanni] §aSkyHanni found a new update: ${it.update.versionName}. " +
+ "§aSkyHanni found a new update: ${it.update.versionName}. " +
"Check §b/sh download update §afor more info.",
"sh"
)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
index deafe3cb3..49c22b26d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
@@ -526,7 +526,7 @@ open class VisualWordGui : GuiScreen() {
}
}
if (importedWords > 0 || skippedWords > 0) {
- chat("§e[SkyHanni] §aSuccessfully imported §e$importedWords §aand skipped §e$skippedWords §aVisualWords from SkyBlockExtras !")
+ chat("§aSuccessfully imported §e$importedWords §aand skipped §e$skippedWords §aVisualWords from SkyBlockExtras !")
SkyHanniMod.feature.storage.visualWordsImported = true
drawImport = false
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt
index 12b2b78df..a2e4d30ac 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt
@@ -33,7 +33,7 @@ class PabloHelper {
if (InventoryUtils.countItemsInLowerInventory { it.name?.contains(itemName) == true } > 0) return
- LorenzUtils.clickableChat("§e[SkyHanni] Click here to grab an $itemName from sacks!", "gfs $itemName 1")
+ LorenzUtils.clickableChat("Click here to grab an $itemName from sacks!", "gfs $itemName 1")
lastSentMessage = SimpleTimeMark.now()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt
index 956572f91..40439571b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/QuestItemHelper.kt
@@ -35,7 +35,7 @@ class QuestItemHelper {
val missingAmount = need - have
LorenzUtils.clickableChat(
- "§e[SkyHanni] Click here to grab x$missingAmount $questItem from sacks!",
+ "Click here to grab x$missingAmount $questItem from sacks!",
"gfs $questItem $missingAmount"
)
lastSentMessage = SimpleTimeMark.now()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
index c689aadc2..1daf482cd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
@@ -145,7 +145,7 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) {
}
fun reset() {
- LorenzUtils.chat("§e[SkyHanni] Reset Reputation Helper.")
+ LorenzUtils.chat("Reset Reputation Helper.")
questHelper.reset()
miniBossHelper.reset()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
index 2090d77e4..2b2de9187 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
@@ -181,7 +181,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) {
count = needAmount
}
if (quest.haveAmount == count) return
- LorenzUtils.chat("§e[SkyHanni] ${quest.displayName} progress: $count/$needAmount")
+ LorenzUtils.chat("${quest.displayName} progress: $count/$needAmount")
quest.haveAmount = count
quest.state = if (count == needAmount) QuestState.READY_TO_COLLECT else QuestState.ACCEPTED
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt
index 541d0510c..6184fd51e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt
@@ -122,7 +122,7 @@ class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) {
"DOJO" -> return DojoQuest(questName, location, displayItem, dojoGoal, state)
}
}
- LorenzUtils.chat("§c[SkyHanni] Unknown Crimson Isle quest: '$name'")
+ LorenzUtils.error("Unknown Crimson Isle quest: '$name'")
return UnknownQuest(name)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt
index 5a79d7c7d..d10aac4ca 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt
@@ -75,12 +75,12 @@ class RiftBloodEffigies {
if (diff < 0L) {
if (s == "7") {
if (time != 0L) {
- LorenzUtils.chat("§e[SkyHanni] Effigy #${index + 1} respawned!")
+ LorenzUtils.chat("Effigy #${index + 1} respawned!")
effigiesTimes = effigiesTimes.editCopy { this[index] = 0L }
}
} else {
if (time != -1L) {
- LorenzUtils.chat("§e[SkyHanni] Effigy #${index + 1} is broken!")
+ LorenzUtils.chat("Effigy #${index + 1} is broken!")
val endTime = System.currentTimeMillis() + 1_000 * 60 * 20
effigiesTimes = effigiesTimes.editCopy { this[index] = endTime }
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
index de2b117d4..983df0d88 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
@@ -98,11 +98,11 @@ object EnigmaSoulWaypoints {
event.usePickblockInstead()
if (soulLocations.contains(split.last())) {
if (!trackedSouls.contains(split.last())) {
- LorenzUtils.chat("§5Tracking the ${split.last()} Enigma Soul!")
+ LorenzUtils.chat("§5Tracking the ${split.last()} Enigma Soul!", prefixColor = "§5")
trackedSouls.add(split.last())
} else {
trackedSouls.remove(split.last())
- LorenzUtils.chat("§5No longer tracking the ${split.last()} Enigma Soul!")
+ LorenzUtils.chat("§5No longer tracking the ${split.last()} Enigma Soul!", prefixColor = "§5")
}
}
}
@@ -176,7 +176,7 @@ object EnigmaSoulWaypoints {
}
if (closestSoul in trackedSouls) {
trackedSouls.remove(closestSoul)
- LorenzUtils.chat("§5Found the $closestSoul Enigma Soul!")
+ LorenzUtils.chat("§5Found the $closestSoul Enigma Soul!", prefixColor = "§5")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
index 364ef77a2..53b7b56f9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
@@ -130,7 +130,7 @@ class ShowMotesNpcSellPrice {
if (!RiftAPI.inRift()) return
pattern.matchMatcher(event.message) {
config.burgerStacks = group("amount").toInt()
- chat("§6[SkyHanni] Set your McGrubber's burger stacks to ${group("amount")}.")
+ chat("Set your McGrubber's burger stacks to ${group("amount")}.")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
index 0b31117a8..c05839ba6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
@@ -223,7 +223,7 @@ object SlayerProfitTracker {
addItemPickup(internalName, amount)
logger.log("Coins gained for picking up an item ($itemName) ${price.addSeparators()}")
if (config.priceInChat && price > config.minimumPrice) {
- LorenzUtils.chat("§e[SkyHanni] §a+Slayer Drop§7: §r$itemName")
+ LorenzUtils.chat("§a+Slayer Drop§7: §r$itemName")
}
if (config.titleWarning && price > config.minimumPriceWarning) {
LorenzUtils.sendTitle("§a+ $itemName", 5.seconds)
@@ -275,7 +275,7 @@ object SlayerProfitTracker {
if (KeyboardManager.isControlKeyDown()) {
itemLog.items.remove(internalName)
- LorenzUtils.chat("§e[SkyHanni] Removed $cleanName §efrom slayer profit display.")
+ LorenzUtils.chat("Removed $cleanName §efrom slayer profit display.")
lastClickDelay = System.currentTimeMillis() + 500
} else {
itemProfit.hidden = !hidden
@@ -364,9 +364,9 @@ object SlayerProfitTracker {
fun clearProfitCommand(args: Array<String>) {
if (itemLogCategory == "") {
- LorenzUtils.chat(
- "§c[SkyHanni] No current slayer data found. " +
- "Go to a slayer area and start the specific slayer type you want to reset the data of."
+ LorenzUtils.userError(
+ "No current slayer data found! " +
+ "§eGo to a slayer area and start the specific slayer type you want to reset the data of.",
)
return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
index e1cc10b6b..728896e22 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
@@ -131,7 +131,7 @@ class SlayerQuestWarning {
if (lastWarning + 10_000 > System.currentTimeMillis()) return
lastWarning = System.currentTimeMillis()
- LorenzUtils.chat("§e[SkyHanni] $chatMessage")
+ LorenzUtils.chat(chatMessage)
if (config.questWarningTitle) {
LorenzUtils.sendTitle("§e$titleMessage", 2.seconds)
@@ -168,4 +168,4 @@ class SlayerQuestWarning {
return slayerType.clazz.isInstance(entity)
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
index 0b98116a2..966b8bdaa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
@@ -70,7 +70,7 @@ class SlayerRngMeterDisplay {
val item = storage.itemGoal
val hasItemSelected = item != "" && item != "?"
if (!hasItemSelected && config.warnEmpty) {
- LorenzUtils.warning("§c[SkyHanni] No Slayer RNG Meter Item selected!")
+ LorenzUtils.userError("No Slayer RNG Meter Item selected!")
LorenzUtils.sendTitle("§cNo RNG Meter Item!", 3.seconds)
}
var blockChat = config.hideChat && hasItemSelected
@@ -86,7 +86,7 @@ class SlayerRngMeterDisplay {
var rawPercentage = old.toDouble() / storage.goalNeeded
if (rawPercentage > 1) rawPercentage = 1.0
val percentage = LorenzUtils.formatPercentage(rawPercentage)
- LorenzUtils.chat("§e[SkyHanni] §dRNG Meter §7dropped at §e$percentage §7XP ($from/${to}§7)")
+ LorenzUtils.chat("§dRNG Meter §7dropped at §e$percentage §7XP ($from/${to}§7)")
lastItemDroppedTime = System.currentTimeMillis()
}
if (blockChat) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt
index 99d854cef..f2f0f874d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt
@@ -123,7 +123,7 @@ class SummoningMobManager {
val name = summoningMob.name
if (currentHealth == 0) {
summoningMobs.remove(entityLiving)
- LorenzUtils.chat("§e[SkyHanni] Your Summoning Mob just §cdied!")
+ LorenzUtils.chat("Your Summoning Mob just §cdied!")
continue
}
@@ -212,4 +212,4 @@ class SummoningMobManager {
var name: String = "",
var lastDisplayName: String = "",
)
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt
index bc5a6c25d..0534c2a72 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniConfigSearchResetCommand.kt
@@ -16,20 +16,21 @@ import kotlinx.coroutines.launch
import java.lang.reflect.Field
import java.lang.reflect.Modifier
+// TODO in the future change something here
object SkyHanniConfigSearchResetCommand {
private var lastCommand = emptyArray<String>()
fun command(args: Array<String>) {
SkyHanniMod.coroutineScope.launch {
- LorenzUtils.chat(runCommand(args))
+ LorenzUtils.chat(runCommand(args), false)
}
lastCommand = args
}
private suspend fun runCommand(args: Array<String>): String {
if (args.isEmpty()) {
- return "§c[SkyHanni] This is a powerful config-edit command, only use it if you know what you are doing!"
+ return "§cThis is a powerful config-edit command, only use it if you know what you are doing!"
}
return when (args[0].lowercase()) {
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
index c7461dc24..e6cb3e841 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
@@ -140,7 +140,8 @@ class SkyHanniDebugsAndTests {
LorenzUtils.clickableChat(
"§cTHIS WILL RESET YOUR SkyHanni CONFIG! Click here to procceed.",
- "shconfigmanagerreset confirm"
+ "shconfigmanagerreset confirm",
+ false
)
}
@@ -162,7 +163,7 @@ class SkyHanniDebugsAndTests {
// resetting the MoulConfigProcessor in use
ConfigGuiManager.editor = null
- LorenzUtils.chat("§e[SkyHanni] Reset the config manager!")
+ LorenzUtils.chat("Reset the config manager!")
}.start()
}
@@ -235,7 +236,7 @@ class SkyHanniDebugsAndTests {
println("Skipped registering listener $simpleName")
}
}
- LorenzUtils.chat("§e[SkyHanni] reloaded ${modules.size} listener classes.")
+ LorenzUtils.chat("reloaded ${modules.size} listener classes.")
}
fun stopListeners() {
@@ -246,7 +247,7 @@ class SkyHanniDebugsAndTests {
MinecraftForge.EVENT_BUS.unregister(original)
println("Unregistered listener $simpleName")
}
- LorenzUtils.chat("§e[SkyHanni] stopped ${modules.size} listener classes.")
+ LorenzUtils.chat("stopped ${modules.size} listener classes.")
}
fun copyLocation(args: Array<String>) {
@@ -353,9 +354,9 @@ class SkyHanniDebugsAndTests {
fun toggleRender() {
globalRender = !globalRender
if (globalRender) {
- LorenzUtils.chat("§e[SkyHanni] §aEnabled global renderer!")
+ LorenzUtils.chat("§aEnabled global renderer!")
} else {
- LorenzUtils.chat("§e[SkyHanni] §cDisabled global renderer! Run this command again to show SkyHanni rendering again.")
+ LorenzUtils.chat("§cDisabled global renderer! Run this command again to show SkyHanni rendering again.")
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt b/src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt
index f2eda2892..95832ac46 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/TestBingo.kt
@@ -7,6 +7,6 @@ object TestBingo {
fun toggle() {
testBingo = !testBingo
- LorenzUtils.chat("§e[SkyHanni] Test Bingo " + (if (testBingo) "enabled" else "disabled"))
+ LorenzUtils.chat("Test Bingo " + (if (testBingo) "enabled" else "disabled"))
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt b/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt
index a924da86d..6b4362215 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/TestExportTools.kt
@@ -61,7 +61,7 @@ object TestExportTools {
}
val json = toJson(Item, stack)
OSUtils.copyToClipboard(json)
- LorenzUtils.chat("§e[SkyHanni] Compressed item info copied into the clipboard!")
+ LorenzUtils.chat("Compressed item info copied into the clipboard!")
}
@@ -76,4 +76,4 @@ object TestExportTools {
event.move(4, "dev.debug.copyNBTData", "dev.debug.copyItemData")
event.move(4, "dev.debug.copyNBTDataCompressed", "dev.debug.copyItemDataCompressed")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt
index f0b2c8ae1..6a583b1e3 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt
@@ -14,7 +14,7 @@ object CopyItemCommand {
fun command() {
val itemStack = InventoryUtils.getItemInHand()
if (itemStack == null) {
- LorenzUtils.chat("§c[SkyHanni] No item in hand!")
+ LorenzUtils.userError("No item in hand!")
return
}
copyItemToClipboard(itemStack)
@@ -53,6 +53,6 @@ object CopyItemCommand {
val string = resultList.joinToString("\n")
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("§e[SkyHanni] Item info copied into the clipboard!")
+ LorenzUtils.chat("Item info copied into the clipboard!")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt
index 97cd1c4ee..dae69775a 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt
@@ -147,9 +147,9 @@ object CopyNearbyEntitiesCommand {
if (counter != 0) {
val string = resultList.joinToString("\n")
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("§e[SkyHanni] $counter entities copied into the clipboard!")
+ LorenzUtils.chat("$counter entities copied into the clipboard!")
} else {
- LorenzUtils.chat("§e[SkyHanni] No entities found in a search radius of $searchRadius!")
+ LorenzUtils.chat("No entities found in a search radius of $searchRadius!")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt
index 88a6f7f5f..fa7fc2e6e 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyParticlesCommand.kt
@@ -41,10 +41,10 @@ object CopyNearbyParticlesCommand {
if (resultList.isEmpty() && tickTime == 0L) tickTime = System.currentTimeMillis()
if (System.currentTimeMillis() > tickTime + 30) {
- if (counter == 0) LorenzUtils.chat("§e[SkyHanni] No particles found nearby, try a larger search radius") else {
+ if (counter == 0) LorenzUtils.chat("No particles found nearby, try a larger search radius") else {
val string = resultList.joinToString("\n")
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("§e[SkyHanni] $counter particles copied into the clipboard!")
+ LorenzUtils.chat("$counter particles copied into the clipboard!")
}
saveNextTick = false
return
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt
index bcc0cfc35..7436ac7f6 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyScoreboardCommand.kt
@@ -21,6 +21,6 @@ object CopyScoreboardCommand {
val string = resultList.joinToString("\n")
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("§e[SkyHanni] scoreboard copied into your clipboard!")
+ LorenzUtils.chat("Scoreboard copied into your clipboard!")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
index c8cbf6a30..258e92ab1 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
@@ -29,7 +29,7 @@ object ErrorManager {
fun command(array: Array<String>) {
if (array.size != 1) {
- LorenzUtils.chat("§cUse /shcopyerror <error id>")
+ LorenzUtils.userError("Use /shcopyerror <error id>")
return
}
@@ -41,10 +41,10 @@ object ErrorManager {
errorMessages[id]
}
val name = if (fullErrorMessage) "Ful error" else "Error"
- LorenzUtils.chat(errorMessage?.let {
+ LorenzUtils.userError(errorMessage?.let {
OSUtils.copyToClipboard(it)
- "§e[SkyHanni] $name copied into the clipboard, please report it on the SkyHanni discord!"
- } ?: "§c[SkyHanni] Error id not found!")
+ "$name copied into the clipboard, please report it on the SkyHanni discord!"
+ } ?: "Error id not found!")
}
fun logErrorState(userMessage: String, internalMessage: String) {
@@ -79,8 +79,9 @@ object ErrorManager {
"```\nSkyHanni ${SkyHanniMod.version}: $rawMessage\n(full stack trace)\n \n$fullStackTrace\n```"
LorenzUtils.clickableChat(
- "§c[SkyHanni ${SkyHanniMod.version}]: $message§c. Click here to copy the error into the clipboard.",
- "shcopyerror $randomId"
+ "§c[SkyHanni-${SkyHanniMod.version}]: $message§c. Click here to copy the error into the clipboard.",
+ "shcopyerror $randomId",
+ false
)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt
index 759cbd9e7..49b5982de 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt
@@ -8,15 +8,15 @@ import net.minecraftforge.common.MinecraftForge
object TestChatCommand {
fun command(args: Array<String>) {
if (args.isEmpty()) {
- LorenzUtils.chat("§c[SkyHanni] Specify a chat message to test")
+ LorenzUtils.userError("Specify a chat message to test!")
return
}
val hidden = args.last() == "-s"
var rawMessage = args.toList().joinToString(" ")
- if (!hidden) LorenzUtils.chat("§a[SkyHanni] testing message: §7$rawMessage")
+ if (!hidden) LorenzUtils.chat("Testing message: §7$rawMessage", prefixColor = "§a")
if (hidden) rawMessage = rawMessage.replace(" -s", "")
val formattedMessage = rawMessage.replace("&", "§")
- LorenzUtils.chat(formattedMessage)
+ LorenzUtils.chat(formattedMessage, false)
MinecraftForge.EVENT_BUS.post(ClientChatReceivedEvent(0, ChatComponentText(formattedMessage)))
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt
index c0116f57c..5e935b407 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt
@@ -60,7 +60,7 @@ object APIUtil {
} else if (retSrc.contains("<center><h1>502 Bad Gateway</h1></center>")) {
if (showApiErrors && apiName == "Hypixel API") {
LorenzUtils.clickableChat(
- "[SkyHanni] Problems with detecting the Hypixel API. §eClick here to hide this message for now.",
+ "Problems with detecting the Hypixel API. §eClick here to hide this message for now.",
"shtogglehypixelapierrors"
)
}
@@ -128,6 +128,6 @@ object APIUtil {
fun toggleApiErrorMessages() {
showApiErrors = !showApiErrors
- LorenzUtils.chat("§e[SkyHanni] Hypixel API error messages " + if (showApiErrors) "§chidden" else "§ashown")
+ LorenzUtils.chat("Hypixel API error messages " + if (showApiErrors) "§chidden" else "§ashown")
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
index 2c5ab63d3..0028b8e38 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
@@ -65,7 +65,7 @@ object ItemUtils {
val list: LinkedList<ItemStack> = LinkedList()
val player = Minecraft.getMinecraft().thePlayer
if (player == null) {
- LorenzUtils.warning("getItemsInInventoryWithSlots: player is null!")
+ LorenzUtils.error("getItemsInInventoryWithSlots: player is null!")
return list
}
for (slot in player.openContainer.inventorySlots) {
@@ -84,7 +84,7 @@ object ItemUtils {
val map: LinkedHashMap<ItemStack, Int> = LinkedHashMap()
val player = Minecraft.getMinecraft().thePlayer
if (player == null) {
- LorenzUtils.warning("getItemsInInventoryWithSlots: player is null!")
+ LorenzUtils.error("getItemsInInventoryWithSlots: player is null!")
return map
}
for (slot in player.openContainer.inventorySlots) {
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index 967f183f6..683b64c3a 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -64,28 +64,78 @@ object LorenzUtils {
val lastWorldSwitch get() = HypixelData.joinedWorld
- const val DEBUG_PREFIX = "[SkyHanni Debug] §7"
+ // TODO log based on chat category (error, warning, debug, user error, normal)
private val log = LorenzLogger("chat/mod_sent")
var lastButtonClicked = 0L
+ private const val DEBUG_PREFIX = "[SkyHanni Debug] §7"
+ private const val USER_ERROR_PREFIX = "§c[SkyHanni] "
+ private val ERROR_PREFIX by lazy { "§c[SkyHanni-${SkyHanniMod.version}] " }
+ private const val CHAT_PREFIX = "[SkyHanni] "
+
+ /**
+ * Sends a debug message to the chat and the console.
+ * This is only sent if the debug feature is enabled.
+ *
+ * @param message The message to be sent
+ *
+ * @see DEBUG_PREFIX
+ */
fun debug(message: String) {
if (SkyHanniMod.feature.dev.debug.enabled && internalChat(DEBUG_PREFIX + message)) {
consoleLog("[Debug] $message")
}
}
- // TODO remove ig?
- fun warning(message: String) {
- internalChat("§cWarning! $message")
- }
-
+ /**
+ * Sends a message to the user that they did something incorrectly.
+ * We should tell them what to do instead as well.
+ *
+ * @param message The message to be sent
+ *
+ * @see USER_ERROR_PREFIX
+ */
+ fun userError(message: String) {
+ internalChat(USER_ERROR_PREFIX + message)
+ }
+
+ /**
+ * Sends a message to the user that an error occurred caused by something in the code.
+ * This should be used for errors that are not caused by the user.
+ *
+ * Why deprecate this? Even if this message is descriptive for the user and the developer,
+ * we don't want inconsitencies in errors, and we would need to search
+ * for the code line where this error gets printed any way.
+ * so it's better to use the stack trace still.
+ *
+ * @param message The message to be sent
+ * @param prefix Whether to prefix the message with the error prefix, default true
+ *
+ * @see ERROR_PREFIX
+ */
+ @Deprecated(
+ "Do not send the user a non clickable non stacktrace containing error message.",
+ ReplaceWith("ErrorManager")
+ )
fun error(message: String) {
println("error: '$message'")
- internalChat("§c$message")
- }
-
- fun chat(message: String) {
- internalChat(message)
+ internalChat(ERROR_PREFIX + message)
+ }
+
+ /**
+ * Sends a message to the user
+ * @param message The message to be sent
+ * @param prefix Whether to prefix the message with the chat prefix, default true
+ * @param prefixColor Color that the prefix should be, default yellow (§e)
+ *
+ * @see CHAT_PREFIX
+ */
+ fun chat(message: String, prefix: Boolean = true, prefixColor: String = "§e") {
+ if (prefix) {
+ internalChat(prefixColor + CHAT_PREFIX + message)
+ } else {
+ internalChat(message)
+ }
}
private fun internalChat(message: String): Boolean {
@@ -244,8 +294,18 @@ object LorenzUtils {
lines[index] = ChatComponentText(text.capAtMinecraftLength(90))
}
- fun clickableChat(message: String, command: String) {
- val text = ChatComponentText(message)
+ /**
+ * Sends a message to the user that they can click and run a command
+ * @param message The message to be sent
+ * @param command The command to be executed when the message is clicked
+ * @param prefix Whether to prefix the message with the chat prefix, default true
+ * @param prefixColor Color that the prefix should be, default yellow (§e)
+ *
+ * @see CHAT_PREFIX
+ */
+ fun clickableChat(message: String, command: String, prefix: Boolean = true, prefixColor: String = "§e") {
+ val msgPrefix = if (prefix) prefixColor + CHAT_PREFIX else ""
+ val text = ChatComponentText(msgPrefix + message)
val fullCommand = "/" + command.removePrefix("/")
text.chatStyle.chatClickEvent = ClickEvent(ClickEvent.Action.RUN_COMMAND, fullCommand)
text.chatStyle.chatHoverEvent =
@@ -253,8 +313,25 @@ object LorenzUtils {
Minecraft.getMinecraft().thePlayer.addChatMessage(text)
}
- fun hoverableChat(message: String, hover: List<String>, command: String? = null) {
- val text = ChatComponentText(message)
+ /**
+ * Sends a message to the user that they can click and run a command
+ * @param message The message to be sent
+ * @param hover The message to be shown when the message is hovered
+ * @param command The command to be executed when the message is clicked
+ * @param prefix Whether to prefix the message with the chat prefix, default true
+ * @param prefixColor Color that the prefix should be, default yellow (§e)
+ *
+ * @see CHAT_PREFIX
+ */
+ fun hoverableChat(
+ message: String,
+ hover: List<String>,
+ command: String? = null,
+ prefix: Boolean = true,
+ prefixColor: String = "§e"
+ ) {
+ val msgPrefix = if (prefix) prefixColor + CHAT_PREFIX else ""
+ val text = ChatComponentText(msgPrefix + message)
text.chatStyle.chatHoverEvent =
HoverEvent(HoverEvent.Action.SHOW_TEXT, ChatComponentText(hover.joinToString("\n")))
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt
index b083b2d3b..1f28effae 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.utils
+import at.hannibal2.skyhanni.test.command.ErrorManager
import java.awt.Desktop
import java.io.IOException
import java.net.URI
@@ -12,12 +13,11 @@ object OSUtils {
try {
Desktop.getDesktop().browse(URI(url))
} catch (e: IOException) {
- e.printStackTrace()
- LorenzUtils.error("[SkyHanni] Error opening website: $url!")
+ ErrorManager.logError(e, "Error opening website: $url")
}
} else {
copyToClipboard(url)
- LorenzUtils.warning("[SkyHanni] Web browser is not supported! Copied url to clipboard.")
+ LorenzUtils.error("Web browser is not supported! Copied url to clipboard.")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt
index d2403d4c6..326283d92 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/SoundUtils.kt
@@ -58,7 +58,7 @@ object SoundUtils {
fun command(args: Array<String>) {
if (args.isEmpty()) {
- LorenzUtils.chat("§c[SkyHanni] Specify a sound effect to test")
+ LorenzUtils.userError("Specify a sound effect to test")
return
}
@@ -72,4 +72,4 @@ object SoundUtils {
fun playErrorSound() {
errorSound.playSound()
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt b/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt
index 67ea197d2..fe07509be 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt
@@ -29,20 +29,20 @@ class TabListData {
fun toggleDebugCommand() {
if (debugCache != null) {
- LorenzUtils.chat("§e[SkyHanni] Disabled tab list debug.")
+ LorenzUtils.chat("Disabled tab list debug.")
debugCache = null
return
}
SkyHanniMod.coroutineScope.launch {
val clipboard = OSUtils.readFromClipboard() ?: return@launch
debugCache = clipboard.lines()
- LorenzUtils.chat("§e[SkyHanni] Enabled tab list debug with your clipboard.")
+ LorenzUtils.chat("Enabled tab list debug with your clipboard.")
}
}
fun copyCommand(args: Array<String>) {
if (debugCache != null) {
- LorenzUtils.clickableChat("§c[SkyHanni] Tab list debug is enambed!", "shdebugtablist")
+ LorenzUtils.clickableChat("Tab list debug is enabled!", "shdebugtablist")
return
}
@@ -57,7 +57,7 @@ class TabListData {
val tabFooter = tabList.footer_skyhanni.conditionalTransform(noColor, { unformattedText }, { formattedText })
val string = "Header:\n\n$tabHeader\n\nBody:\n\n${resultList.joinToString("\n")}\n\nFooter:\n\n$tabFooter"
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("§e[SkyHanni] Tab list copied into the clipboard!")
+ LorenzUtils.chat("Tab list copied into the clipboard!")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt
index 26153e5c9..f882a268e 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt
@@ -29,12 +29,12 @@ class SkyHanniTracker<Data : TrackerData>(
fun resetCommand(args: Array<String>, command: String) {
if (args.size == 1 && args[0].lowercase() == "confirm") {
- reset(DisplayMode.TOTAL, "§e[SkyHanni] Reset total $name!")
+ reset(DisplayMode.TOTAL, "Reset total $name!")
return
}
LorenzUtils.clickableChat(
- "§e[SkyHanni] Are you sure you want to reset your total $name? Click here to confirm.",
+ "Are you sure you want to reset your total $name? Click here to confirm.",
"$command confirm"
)
}
@@ -86,7 +86,7 @@ class SkyHanniTracker<Data : TrackerData>(
),
) {
if (sessionResetTime.passedSince() > 3.seconds) {
- reset(DisplayMode.SESSION, "§e[SkyHanni] Reset this session of $name!")
+ reset(DisplayMode.SESSION, "Reset this session of $name!")
sessionResetTime = SimpleTimeMark.now()
}
}