aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/garden
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt20
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/HighlightVisitorsOutsideOfGarden.kt5
7 files changed, 21 insertions, 22 deletions
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 566589358..e39387c97 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt
@@ -94,7 +94,7 @@ class GardenLevelDisplay {
ChatUtils.clickableChat(
" \n§b§lGARDEN LEVEL UP §8$oldLevel ➜ §b$newLevel\n" +
" §8+§aRespect from Elite Farmers and SkyHanni members :)\n ",
- "/gardenlevels",
+ "gardenlevels",
false
)
}
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 471fc7e35..82ccc9a93 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
@@ -246,7 +246,9 @@ object GardenNextJacobContest {
} else {
ChatUtils.clickableChat(
"§2Click here to submit this year's farming contests. Thank you for helping everyone out!",
- "shsendcontests"
+ onClick = {
+ shareContests()
+ }
)
}
}
@@ -289,22 +291,18 @@ object GardenNextJacobContest {
}
}
- fun shareContestConfirmed(array: Array<String>) {
- if (array.size == 1) {
- if (array[0] == "enable") {
- config.shareAutomatically = ShareContestsEntry.AUTO
- SkyHanniMod.feature.storage.contestSendingAsked = true
- ChatUtils.chat("§2Enabled automatic sharing of future contests!")
- }
- return
- }
+ private fun shareContests() {
if (contests.size == MAX_CONTESTS_PER_YEAR) {
sendContests()
}
if (!SkyHanniMod.feature.storage.contestSendingAsked && config.shareAutomatically == ShareContestsEntry.ASK) {
ChatUtils.clickableChat(
"§2Click here to automatically share future contests!",
- "shsendcontests enable"
+ onClick = {
+ config.shareAutomatically = ShareContestsEntry.AUTO
+ SkyHanniMod.feature.storage.contestSendingAsked = true
+ ChatUtils.chat("§2Enabled automatic sharing of future contests!")
+ }
)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt
index 46ff67a2b..be7008e36 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt
@@ -165,7 +165,7 @@ object ArmorDropTracker {
}
}
- fun resetCommand(args: Array<String>) {
- tracker.resetCommand(args, "shresetarmordroptracker")
+ fun resetCommand() {
+ tracker.resetCommand()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
index 49d38d7ba..6638cf2fa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt
@@ -172,7 +172,7 @@ object DicerRngDropTracker {
}
}
- fun resetCommand(args: Array<String>) {
- tracker.resetCommand(args, "shresetdicertracker")
+ fun resetCommand() {
+ tracker.resetCommand()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
index 6ab266f44..9663f67f8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
@@ -50,7 +50,9 @@ object FarmingLaneAPI {
ChatUtils.clickableChat(
"No ${crop.cropName} lane defined yet! Use §e/shlanedetection",
- command = "shlanedetection"
+ onClick = {
+ FarmingLaneCreator.commandLaneDetection()
+ }
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt
index 8d6947ef7..bad0003d6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt
@@ -139,8 +139,8 @@ object PestProfitTracker {
}
}
- fun resetCommand(args: Array<String>) {
- tracker.resetCommand(args, "shresetpestprofittracker")
+ fun resetCommand() {
+ tracker.resetCommand()
}
fun isEnabled() = GardenAPI.inGarden() && config.enabled
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 1faa94c81..447396d43 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,9 +97,8 @@ class HighlightVisitorsOutsideOfGarden {
if (isVisitor(entity) || (entity is EntityArmorStand && isVisitorNearby(entity.getLorenzVec()))) {
event.isCanceled = true
if (packet.action == C02PacketUseEntity.Action.INTERACT) {
- ChatUtils.clickableChat(
- "Blocked you from interacting with a visitor. Sneak to bypass or click here to change settings.",
- "/sh block interacting with visitors"
+ ChatUtils.chatAndOpenConfig("Blocked you from interacting with a visitor. Sneak to bypass or click here to change settings.",
+ GardenAPI.config.visitors::blockInteracting
)
}
}