diff options
author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-03-16 11:03:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-16 11:03:30 +0100 |
commit | 4f696dca502d52d77a941c0504006878d2133d1f (patch) | |
tree | 30fa1500ee16aa97669a37acecc3dcdfb2ce5f5f /src/main/java | |
parent | 23278f006e47bf3d9287ad5b4ef3ec7d15c42ded (diff) | |
download | skyhanni-4f696dca502d52d77a941c0504006878d2133d1f.tar.gz skyhanni-4f696dca502d52d77a941c0504006878d2133d1f.tar.bz2 skyhanni-4f696dca502d52d77a941c0504006878d2133d1f.zip |
Feature: Custom fishing hook alert text (#1169)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java | 12 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java index e2cfdfa05..b0357eb0c 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/FishingHookDisplayConfig.java @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorText; import io.github.moulberry.moulconfig.annotations.ConfigOption; public class FishingHookDisplayConfig { @@ -16,6 +17,15 @@ public class FishingHookDisplayConfig { @Expose @ConfigOption( + name = "Custom Alert", + desc = "Replaces the default §c§l!!!§r Hypixel\n" + + "§7alert with your own custom one." + ) + @ConfigEditorText + public String customAlertText = "&c&l!!!"; + + @Expose + @ConfigOption( name = "Hide Armor Stand", desc = "Hide the original armor stand from Hypixel when the SkyHanni display is enabled." ) @@ -23,5 +33,5 @@ public class FishingHookDisplayConfig { public boolean hideArmorStand = true; @Expose - public Position position = new Position(460, -240, 3.4f); + public Position position = new Position(-475, -240, 3.4f, true); } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt index 671ae0841..32e31edf0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt @@ -75,8 +75,9 @@ class FishingHookDisplay { return } if (!armorStand.hasCustomName()) return + val alertText = if (armorStand.name == "§c§l!!!") config.customAlertText.replace("&", "§") else armorStand.name - config.position.renderString(armorStand.name, posLabel = "Fishing Hook Display") + config.position.renderString(alertText, posLabel = "Fishing Hook Display") } private fun EntityArmorStand.hasCorrectName(): Boolean { |