Creating a sidebar help
I'm setting up a world that increases in size each Minecraft day but I can't get the sidebar to work. How can make a sidebar that displays the size of the world border?
Best Answer
You must use the QueryResult CommandStat to obtain the worldborder size as a score.
Prerequisites:
Objective to hold the worldborder size.
/scoreboard objectives add INFO dummy
/scoreboard objectives setdisplay sidebar INFO
In order for CommandStats to modify a target's score, that target must be tracked on the scoreboard prior.
/scoreboard players set WorldBorder INFO 0
Detection:
Insert the following into a command block on a clock.
/worldborder get
Whenever the command runs, it will reurn a QueryResult value equal to the worldborder size. However, that return value is useless without applying a trigger to the command block.
Stand on top of the command block and run the following command yourself a single time:
/stats block ~ ~-1 ~ set QueryResult WorldBorder INFO
Now whenever the command block runs its stored command, and that command returns a QueryResult value, fake player WorldBorder will have their "INFO" score set equal to that return value.
Pictures about "Creating a sidebar help"



How do you make a side bar?
You can add menu items in that space if you want.How do you make a sidebar sticky?
You can either make a custom stylesheet specifying the sidebar style or you can add an inline CSS code "position: sticky" to your sidebar element/container.How do I get my sidebar to stay in place?
The easiest way to handle this is just to use CSS fixed positioning. Our sidebar is within a #page-wrap div with relative positioning, so the sidebar will set inside there, then we just push it over into place with margin. With this technique, the sidebar stays solidly in place as you scroll down the page.How do sidebars work?
In writing, a sidebar is a shorter piece of text that appears next to and accompanies a longer article. Sidebars can appear in publications such as magazines, newspapers, websites, or blogs. Sidebars can feature dissenting opinions, additional resources, real-life examples, or expert viewpoints.Sidebar Menu using HTML \u0026 CSS
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ketut Subiyanto, Vanessa Loring, Eren Li, Vanessa Loring
