So I attempted to create my own minecraft server. Upon opening the .jar file, the files seem to generate in my [myusername] folder instead of my dedicated "server" file on the desktop. How can I change that?
Create a folder with your server-version.jar in it.
Then open your terminal, type "cd your/folder/path".
Then do "sudo java -jar server-version.jar". This will create the first few files. You'll need to agree to the EULA.
Finally, start your server using the previous command or using "sudo java -Xms512M -Xmx2048M -jar server-version.jar". You can modify the minimum and maximum ram which will be allocated to your Minecraft server.
This is what it looks like in my case using the latest spigot release :
cd /Users/******/Desktop/Minecraft\ Server
sudo java -jar spigot-1.16.4.jar
// Agree to the EULA in the EULA.txt
sudo java -Xms512M -Xmx2048M spigot-1.16.4.jar
All the files should be in the folder you created earlier.