Paper api endpoints have been updated to api.papermc.io/v2 from the old papermc.io/api/v2
This is a copy of default Paper egg from the Panel, but without PTDL_V2 changes, which requires Panel 1.8+ that has not been released yet.
Add check for latest `[[ "${MC_VERSION}" == "latest" ]]`.
Previously, it was only checking for exact versions or empty value, and I completely forgot to test latest.
Resolves#1516
Rewrite the egg to support dev and stable versions, together with newer +1.16 installers.
Does not rely on their own API latest fetching, because it picks latest Github release that can include old pre-releases.
clean up the code and add more debugging steps for easier troubleshooting when someone reports issues
Easy to view diff: <https://www.diffchecker.com/3iJ9lVzH>