aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
index d78a6988..095dde87 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
@@ -24,6 +24,7 @@ import com.google.gson.JsonObject;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.listener.ScoreboardLocationChangeListener;
import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.LocationChangeEvent;
+import io.github.moulberry.notenoughupdates.overlays.OverlayManager;
import io.github.moulberry.notenoughupdates.overlays.SlayerOverlay;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiChest;
@@ -302,15 +303,21 @@ public class SBInfo {
lastLocRaw = System.currentTimeMillis();
NotEnoughUpdates.INSTANCE.sendChatMessage("/locraw");
}
- if (currentTime - lastMayorUpdate > 300 * 1000) {
- updateMayor();
- lastMayorUpdate = currentTime;
- }
+ if (currentTime - lastMayorUpdate > 300 * 1000) {
+ updateMayor();
+ lastMayorUpdate = currentTime;
+ }
try {
for (NetworkPlayerInfo info : Minecraft.getMinecraft().thePlayer.sendQueue.getPlayerInfoMap()) {
String name = Minecraft.getMinecraft().ingameGUI.getTabList().getPlayerName(info);
if (name.startsWith(profilePrefix)) {
- currentProfile = Utils.cleanColour(name.substring(profilePrefix.length()));
+ String newProfile = Utils.cleanColour(name.substring(profilePrefix.length()));
+ if (!Objects.equals(currentProfile, newProfile)) {
+ currentProfile = newProfile;
+ if (NotEnoughUpdates.INSTANCE.config != null)
+ if (NotEnoughUpdates.INSTANCE.config.mining.powderGrindingTrackerResetMode == 2)
+ OverlayManager.powderGrindingOverlay.load();
+ }
hasNewTab = true;
} else if (name.startsWith(skillsPrefix)) {
String levelInfo = name.substring(skillsPrefix.length()).trim();