aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-21 13:58:20 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-21 13:58:20 +0100
commite76fc4f40e5edf01527472f6cecdd59fd008c647 (patch)
treec9d0cab481c0705215479c0abda041a3eb3108fe
parent51f4ed20276b2ab75d5766dd4556c76f9e5eb415 (diff)
downloadskyhanni-e76fc4f40e5edf01527472f6cecdd59fd008c647.tar.gz
skyhanni-e76fc4f40e5edf01527472f6cecdd59fd008c647.tar.bz2
skyhanni-e76fc4f40e5edf01527472f6cecdd59fd008c647.zip
Show new visitors and fixed bugs.
-rw-r--r--CHANGELOG.md1
-rw-r--r--FEATURES.md1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Garden.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt8
4 files changed, 13 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3ec268ef3..a0e774348 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@
+ Added **Crop Milestone** Number - Show the number of the crop milestone in the inventory.
+ Added **Crop Upgrades** Number - Show the number of upgrades in the crop upgrades inventory.
+ Added **Visitor Timer** - Timer when the next visitor will appear, and a number how many visitors are already waiting.
++ Added **Visitor Notification** - Show as title and in chat when a new visitor is visiting your island.
### Features from other Mods
> *The following features are only there because I want them when testing SkyHanni features without other mods present.*
diff --git a/FEATURES.md b/FEATURES.md
index 7a8c1c211..ff1389a80 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -166,6 +166,7 @@
+ **Crop Milestone** Number - Show the number of the crop milestone in the inventory.
+ **Crop Upgrades** Number - Show the number of upgrades in the crop upgrades inventory.
+ **Visitor Timer** - Timer when the next visitor will appear, and a number how many visitors are already waiting.
++ **Visitor Notification** - Show as title and in chat when a new visitor is visiting your island.
## Commands
- /wiki (using hypixel-skyblock.fandom.com instead of Hypixel wiki)
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java
index 967c2487b..78ddb5e37 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java
@@ -72,6 +72,12 @@ public class Garden {
public boolean visitorNeedsOnlyWhenClose = false;
@Expose
+ @ConfigOption(name = "Notification", desc = "Show as title and in chat when a new visitor is visiting your island.")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 1)
+ public boolean visitorNotification = true;
+
+ @Expose
@ConfigOption(name = "Highlight Ready", desc = "Highlight the visitor when the required items are in the inventory.")
@ConfigEditorBoolean
@ConfigAccordionId(id = 1)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
index 3d58a9714..c3d26c90f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.garden
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
+import at.hannibal2.skyhanni.data.SendTitleHelper
import at.hannibal2.skyhanni.events.*
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
import at.hannibal2.skyhanni.utils.*
@@ -190,14 +191,15 @@ class GardenVisitorFeatures {
}
}
if (visitors.keys.removeIf { it !in visitorsInTab }) {
- println("removed an npc")
update()
}
for (name in visitorsInTab) {
if (!visitors.containsKey(name)) {
visitors[name] = Visitor(-1)
- // todo notification? (check world age first)
- println("found an npc: '$name'")
+ if (SkyHanniMod.feature.garden.visitorNotification) {
+ SendTitleHelper.sendTitle("§eNew Visitor", 5_000)
+ LorenzUtils.chat("§e[SkyHanni] $name §eis visiting your garden!")
+ }
update()
}
}