How would I force my server to download a specific file every time the server is started up? For example; I have a plugin coded, and I want to make it so it will automatically reinstall that plugin to the server every time it is started up, but I want it to check if the server has the plugin already.
So, for example the plugin would be called Test.jar I want to check to see if the server contains the file "Test.jar", if it does, do nothing, else install the plugin.
Also, if that above is possible, how would I check to see if it is the correct file, rather than just a random filed named "Test.jar" to get around that check?
If it helps, I use the Pterodactyl panel, so maybe a script can be added to the Startup Command?
I also have all the information necessary to hook a discord bot up to the panel, which I've started doing, but I can't find a good API for javascript.
I tried using websockets, but I can not seem to find any documentation to assist me on this, I also tried asking for support on the Pterodactyl support discord, and searching on the API documentation, but I can't figure it out.