aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java1
-rw-r--r--src/main/java/me/Danker/features/ColouredNames.java2
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java7
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java1
4 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index 09b59d9..91584f8 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -49,6 +49,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean giantHP;
public static boolean hidePetCandy;
public static boolean customColouredNames;
+ public static boolean customNametags;
public static boolean endOfFarmAlert;
public static boolean gemstoneLore;
public static boolean crystalHollowWaypoints;
diff --git a/src/main/java/me/Danker/features/ColouredNames.java b/src/main/java/me/Danker/features/ColouredNames.java
index 90d722e..9f7890c 100644
--- a/src/main/java/me/Danker/features/ColouredNames.java
+++ b/src/main/java/me/Danker/features/ColouredNames.java
@@ -72,7 +72,7 @@ public class ColouredNames {
@SubscribeEvent(priority = EventPriority.LOW)
public void onRenderLiving(RenderLivingEvent.Specials.Pre<EntityLivingBase> event) {
- if (!ToggleCommand.customColouredNames || !Utils.inSkyblock) return;
+ if (!ToggleCommand.customColouredNames || !ToggleCommand.customNametags || !Utils.inSkyblock) return;
Entity entity = event.entity;
if (entity instanceof EntityArmorStand && !entity.isDead && entity.hasCustomName()) {
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 9e013b7..663adf5 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -74,6 +74,7 @@ public class DankerGui extends GuiScreen {
private GuiButton giantHP;
private GuiButton hidePetCandy;
private GuiButton customColouredNames;
+ private GuiButton customNametags;
private GuiButton endOfFarmAlert;
private GuiButton gemstoneLore;
private GuiButton autoAcceptReparty;
@@ -177,6 +178,7 @@ public class DankerGui extends GuiScreen {
giantHP = new FeatureButton("Display Giant HP: " + Utils.getColouredBoolean(ToggleCommand.giantHP), "Displays health of Sadan's giants during F6 bossfight and F7 blood room.");
hidePetCandy = new FeatureButton("Hide Pet Candy: " + Utils.getColouredBoolean(ToggleCommand.hidePetCandy), "Hide pet candy in pet tooltips.");
customColouredNames = new FeatureButton("Custom Name Colors: " + Utils.getColouredBoolean(ToggleCommand.customColouredNames), "Replaces some player's usernames with a custom color.");
+ customNametags = new FeatureButton("Custom Color on Nametags: " + Utils.getColouredBoolean(ToggleCommand.customNametags), "Displays custom name colors on nametags. Disabling will increase performance with custom colors.");
endOfFarmAlert = new FeatureButton("Alert When Reaching End of Farm: " + Utils.getColouredBoolean(ToggleCommand.endOfFarmAlert), "Alerts when you go past coords set with /dsmfarmlength.");
gemstoneLore = new FeatureButton("Applied Gemstones in Lore: " + Utils.getColouredBoolean(ToggleCommand.gemstoneLore), "Adds applied gemstones to item tooltip.");
autoAcceptReparty = new FeatureButton("Auto Accept Reparty: " + Utils.getColouredBoolean(ToggleCommand.autoAcceptReparty), "Automatically rejoins parties when disbanded and invited.");
@@ -238,6 +240,7 @@ public class DankerGui extends GuiScreen {
allButtons.add(giantHP);
allButtons.add(hidePetCandy);
allButtons.add(customColouredNames);
+ allButtons.add(customNametags);
allButtons.add(endOfFarmAlert);
allButtons.add(gemstoneLore);
allButtons.add(autoAcceptReparty);
@@ -544,6 +547,10 @@ public class DankerGui extends GuiScreen {
ToggleCommand.fishingAlert = !ToggleCommand.fishingAlert;
ConfigHandler.writeBooleanConfig("toggles", "FishingAlert", ToggleCommand.fishingAlert);
fishingAlert.displayString = "Fishing Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.fishingAlert);
+ } else if (button == customNametags) {
+ ToggleCommand.customNametags = !ToggleCommand.customNametags;
+ ConfigHandler.writeBooleanConfig("toggles", "CustomNametags", ToggleCommand.customNametags);
+ customNametags.displayString = "Custom Color on Nametags: " + Utils.getColouredBoolean(ToggleCommand.customNametags);
}
}
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 48693c8..1f00c9f 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -223,6 +223,7 @@ public class ConfigHandler {
ToggleCommand.giantHP = initBoolean("toggles", "GiantHP", false);
ToggleCommand.hidePetCandy = initBoolean("toggles", "HidePetCandy", false);
ToggleCommand.customColouredNames = initBoolean("toggles", "CustomColouredNames", true); // enabled by default
+ ToggleCommand.customNametags = initBoolean("toggles", "CustomNametags", true);
ToggleCommand.endOfFarmAlert = initBoolean("toggles", "EndOfFarmAlert", false);
ToggleCommand.gemstoneLore = initBoolean("toggles", "GemstoneLore", false);
ToggleCommand.crystalHollowWaypoints = initBoolean("toggles", "CrystalHollowWaypoints", false);