Skip to content

Commit

Permalink
Fix Build Limit widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Fesaa committed Aug 1, 2024
1 parent e7b729b commit 955c402
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static void register(Cubepanion addon) {
hudWidgetRegistry.register(
new TextTrackerHudWidget(category, "distance_to_build_limit", "Build limit in", "0",
() -> {
LoadedGameMap map = GameMapAPI.getInstance().getGameMapFromCache(addon.getManager().getDivision(), addon.getManager().getMapName());;
LoadedGameMap map = GameMapAPI.getInstance().getCurrentMap();;
if (map == null) {
return "";
}
Expand All @@ -157,7 +157,7 @@ public static void register(Cubepanion addon) {

return String.valueOf(d);
},
() -> addon.getManager().isPlaying(CubeGame.TEAM_EGGWARS)
() -> GameMapAPI.getInstance().getCurrentMap() != null
&& !addon.getManager().isInPreLobby(), 5, 1, () -> true));

// Fireball Cooldown
Expand Down

0 comments on commit 955c402

Please sign in to comment.