diff options
author | nea <nea@nea.moe> | 2023-02-17 20:29:37 +0100 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-02-17 20:29:57 +0100 |
commit | 5736af8495977b35af1d48dc8314cb45629a6ebc (patch) | |
tree | 7ab73bc85c516a22dd4941e98c9b4f35a70121fd /src/main/java/com/thatgravyboat/skyblockhud/location | |
parent | 6f7966056af411c7e195a48dc56264636731db8a (diff) | |
download | SkyblockHud-Death-Defied-5736af8495977b35af1d48dc8314cb45629a6ebc.tar.gz SkyblockHud-Death-Defied-5736af8495977b35af1d48dc8314cb45629a6ebc.tar.bz2 SkyblockHud-Death-Defied-5736af8495977b35af1d48dc8314cb45629a6ebc.zip |
Make cleanup percentage work without updatingv1.15.0
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java index a2d113d..5641202 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java @@ -3,6 +3,7 @@ package com.thatgravyboat.skyblockhud.location; import com.thatgravyboat.skyblockhud.api.events.LocationChangeEvent; import com.thatgravyboat.skyblockhud.api.events.ProfileSwitchedEvent; import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent; +import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent; import com.thatgravyboat.skyblockhud.utils.Utils; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -27,6 +28,13 @@ public class IslandHandler { } @SubscribeEvent + public void onSidebarUpdate(SidebarPostEvent event) { + for (String line : event.scores) { + hadCleanupPercentage |= checkPlotClearPercentage(line.replaceAll("[^a-zA-Z:0-9,%. ]", "")); + } + } + + @SubscribeEvent public void onLocationChange(LocationChangeEvent event) { hadCleanupPercentage = false; } |