If you're running on a panel like pterodactyl or multicraft that allows a /restart from an op or console, would a plugin that runs /restart as console restart a server? I know both of these panels have a scheduled or timed command option, but just curious if this would work.
Just call Spigot.restart() and make sure you have you spigot.yml restart-script: set to your .bat or .sh file https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Server.Spigot.html#restart--
I'm running on a panel, and I have absolutely no clue where the .bat or .sh file is. I'm asking if running /restart from console would work if your panel accepts it.
Oh LOL this is a plugin development help subforum haha. Yeah it should be setup by default. Just use 'restart' no / and if the server just shuts down. Look to see if there is a setting you can mess with. The host I use for my demo server uses panel called Prisma, and I havent used McMyAdmin or Multicraft in years.