diff options
| author | KingsMMA <63374258+KingsMMA@users.noreply.github.com> | 2022-10-22 00:31:07 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-21 07:31:07 -0700 |
| commit | 72adbc192fc53cd90408f4382b66310d77e2be2a (patch) | |
| tree | 9f693b1c2828ee0a68a5107ff42478f93d57611a /src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java | |
| parent | 78714fc2fddb99ba9f1239d7d0d95837a312cbb8 (diff) | |
| download | notenoughupdates-72adbc192fc53cd90408f4382b66310d77e2be2a.tar.gz notenoughupdates-72adbc192fc53cd90408f4382b66310d77e2be2a.tar.bz2 notenoughupdates-72adbc192fc53cd90408f4382b66310d77e2be2a.zip | |
Added Powder Grinding Tracker (#263)
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.java | 17 |
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(); |
