aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-11-19 00:02:48 +0000
committerGitHub <noreply@github.com>2023-11-19 01:02:48 +0100
commit0b1fa4dedc21e997234694d9d11805e4996b54b6 (patch)
tree7bb6d201573f0205bf9ce73f19d65a98fb128e60 /src/main/java/at/hannibal2/skyhanni/data
parentcfa64d7f4360093523029b52dabea8e30ce966b6 (diff)
downloadskyhanni-0b1fa4dedc21e997234694d9d11805e4996b54b6.tar.gz
skyhanni-0b1fa4dedc21e997234694d9d11805e4996b54b6.tar.bz2
skyhanni-0b1fa4dedc21e997234694d9d11805e4996b54b6.zip
Internal Change: Auto-Prefix Chat Messages (#622)
Add auto prefix to chat message methods. #622
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-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
3 files changed, 19 insertions, 15 deletions
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")
}