Running batch file from Spigot

Discussion in 'Spigot Discussion' started by lpinfinity, Mar 15, 2020.

  1. Before someone tells me, this is not a question for how to run spigot from a batch file. I would like to know how to (if possible) make spigot execute a batch file when a specific event is triggered. For example, I would like to make it so that a player can press a button that will copy the world files from my survival server to another server to be used as a pvp world.
  2. This isn't the plugin development, so the OP isn't asking how to write Java code to do it.

    Yes, it is possible. No, it is not a good idea. You'd need to have a plugin that can run arbitrary system commands. This means if the plugin is flawed in it's design, it could lead to anyone being able to run "rm -Rf" or "format C:" from inside the game - would you want that?

    Much better to build a custom plugin that handles what you want from inside Java itself.

  3. I agree. It sounds like a cool concept, but isn't very practical / wise. Best of luck!
  4. I am also looking for this same feature. Different purposes though, I need to execute a batch file from in game, to delete all player advancements. OP have you found a solution?
  5. Strahan


    You don't need a batch file for that, just use the /advancement command
  6. That command does not revoke from offline players.
    • Like Like x 1