How my plugin works
For those who have used my plugin for a while, you will realise that ping isn't really the best indicator of lag that most people suffer from.
You have 3 main types of lag:
- Server lag - Where the entire server pauses and everyone stops at the same time. Everyone on the same server will notice this happening at the same time. Your connection to the server is still there.
- Connection Loss - Where you lose connection to the server. It will seem like things freeze, but things are still happening on the server for you and other people. When your connection comes back, you will seem to catch up with everything else.
- High latency - Where your inputs take time to reach the server (your ping), meaning everything happens later than you expect. This often happens when you connect to a foreign server, rather than one in your local region.
Server lag is special in that you must have a character logged in to be able to measure it at all. While a server can freeze, it can still respond to ping requests, which is how my plugin determines the difference.
When ever the server lags, the time for a tick to happen will take longer than 600ms, meaning that the clock of the server has fallen behind what it should be. This change can add up to seconds of lost time every minute.
Collecting and displaying data for world switcher
The plugin doesn't really keep this data for very long, but instead, it could keep track of the last 60 seconds you were on the server, keeping a note of how many seconds of lag you have experienced. This data would then be sent to a server by every logged in client. Assuming you had at least one person using the plugin on a world, you can get a clear picture of which worlds are the "laggiest" by how many seconds have been lost by each of them in 60 seconds.
The clients could then request for the lag data for all the worlds (Just an integer for every world) which can be used to indicate lag on any world in the world switcher. This could be something simple like a colour, but a real value could be useful. This would be a value starting at 100% for no lag, and decreases to 0% when the server has been frozen for the entire 60 seconds. It would indicate how many of the 100 ticks have been received in the last 60 seconds.
There isn't much room on world switcher, so it could look like this:

The player count would change, Red being the laggiest, green being no server lag. You would hover to see the exact value.
Privacy Vs Usefulness
Sending data to the server should be opt-in, but if not enough people opt-in then it is unlikely enough would be collected for it to be useful. I think it is only fair that you must opt-in to make use of the data it provides.
How my plugin works
For those who have used my plugin for a while, you will realise that ping isn't really the best indicator of lag that most people suffer from.
You have 3 main types of lag:
Server lag is special in that you must have a character logged in to be able to measure it at all. While a server can freeze, it can still respond to ping requests, which is how my plugin determines the difference.
When ever the server lags, the time for a tick to happen will take longer than 600ms, meaning that the clock of the server has fallen behind what it should be. This change can add up to seconds of lost time every minute.
Collecting and displaying data for world switcher
The plugin doesn't really keep this data for very long, but instead, it could keep track of the last 60 seconds you were on the server, keeping a note of how many seconds of lag you have experienced. This data would then be sent to a server by every logged in client. Assuming you had at least one person using the plugin on a world, you can get a clear picture of which worlds are the "laggiest" by how many seconds have been lost by each of them in 60 seconds.
The clients could then request for the lag data for all the worlds (Just an integer for every world) which can be used to indicate lag on any world in the world switcher. This could be something simple like a colour, but a real value could be useful. This would be a value starting at 100% for no lag, and decreases to 0% when the server has been frozen for the entire 60 seconds. It would indicate how many of the 100 ticks have been received in the last 60 seconds.
There isn't much room on world switcher, so it could look like this:
The player count would change, Red being the laggiest, green being no server lag. You would hover to see the exact value.
Privacy Vs Usefulness
Sending data to the server should be opt-in, but if not enough people opt-in then it is unlikely enough would be collected for it to be useful. I think it is only fair that you must opt-in to make use of the data it provides.