From 685c8d232bcef40178d331ad4d3dde7ae0d1c3e9 Mon Sep 17 00:00:00 2001 From: Alexia Luna Date: Thu, 21 Mar 2024 17:58:56 +0100 Subject: Removed Feature: Colored Visitor Name (#1228) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../config/features/garden/visitor/VisitorConfig.java | 6 ------ .../features/garden/visitor/GardenVisitorColorNames.kt | 3 --- .../features/garden/visitor/GardenVisitorFeatures.kt | 12 ------------ 3 files changed, 21 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java index b3f9ab1d8..098eddea1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java @@ -77,12 +77,6 @@ public class VisitorConfig { } } - @Expose - @ConfigOption(name = "Colored Name", desc = "Show the visitor name in the color of the rarity.") - @ConfigEditorBoolean - @FeatureToggle - public boolean coloredName = true; - @Expose @ConfigOption(name = "Hypixel Message", desc = "Hide the chat message from Hypixel that a new visitor has arrived at your garden.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorColorNames.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorColorNames.kt index 2a5278c47..3e0b9c7a9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorColorNames.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorColorNames.kt @@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.garden.visitor import at.hannibal2.skyhanni.data.jsonobjects.repo.GardenJson import at.hannibal2.skyhanni.events.RepositoryReloadEvent -import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -24,8 +23,6 @@ object GardenVisitorColorNames { } fun getColoredName(name: String): String { - if (!GardenAPI.config.visitors.coloredName) return name - val cleanName = name.removeColor() val color = visitorColours[cleanName] ?: return name return color + cleanName 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 b9c88a095..3ebb8e5be 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 @@ -594,18 +594,6 @@ class GardenVisitorFeatures { return false } - @SubscribeEvent(priority = EventPriority.HIGH) - fun onRenderLiving(event: SkyHanniRenderEntityEvent.Specials.Pre) { - if (!config.coloredName) return - val entity = event.entity - val entityId = entity.entityId - for (visitor in VisitorAPI.getVisitors()) { - if (visitor.nameTagEntityId == entityId) { - entity.customNameTag = GardenVisitorColorNames.getColoredName(entity.name) - } - } - } - @SubscribeEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Garden Visitor Stats") -- cgit