I have a server that recently restarted in a new world, and to switch things up we're playing with a world border that starts extremely small and expands very slowly. (We're at just under 300 blocks right now) I've created a bossbar to keep track of the world border's expansion visually without needing to actually go see where it is at the moment, and I have it set up to show the current number with our maximum current expansion as the maximum value. (For example, 256 of 1000)
Right now, this bar is updated manually by myself when I log in. It isn't very useful as a result, because it doesn't keep up to date as the border expands. This is where the reason for this post is relevant: How can I set the game up to automatically advance the boss bar as the world border expands? I know how to operate the world border and the boss bar; the part I'm not sure about is capturing the world border's current value as a string and sending that to the boss bar's "value" entry. I know this is possible, I just don't know how to do it.
Can someone with more knowledge of the technical commands in the game help me figure this out? I'm assuming I'll need a Command Block (maybe several) and that's fine, I just don't know what commands to use to keep this going actively and automatically. Additionally, is this possible without creating too much lag? Our sever has a good amount of memory but we're playing it extra safe to keep the experience lag-free.