Issue commands in run.bat?

Discussion in 'Bukkit Help' started by KyleSCA, Sep 30, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    I was wondering if there was a way or line you could add to the run.bat. I wanted to add the command /save-all when the server stops/restarts plz reply thx!
  2. Offline


    Impossible. Because bukkit only runs on the start-up script for the server.
    An example of mine:

    java -Xms2018M -Xmx2018M -jar craftbukkit.jar -o true
    If you add something after your start-up script, it will be normal cmd or terminal. No longer bukkit.
  3. Offline


    Maybe look into something like Plugin Development. and put this in OnEnable()
    1. Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "*insert command here*");

    Happy Coding!
  4. Offline


    I'm currently not the best at coding can you please dumb it down for me?
  5. Offline


    KyleSCA Uh, Yeah. I would recommend looking at some plugin tutorials. However I am looking into making a plugin for this. With config and everything. However I ask one thing of you. If you were to name this plugin what would you call it? (Also, the plugin could be finished within 20 minutes if you give me this :p.)
  6. Offline


    That's greeeeat I was wanting something along the lines of "simple force save" I don't care if it goes public but just make sure it's the command /save-all so it saves correctly thanksssssssss!
  7. Offline


    So you want it to run the command save-all? when it starts or stops? EDIT: Oops I'm stupid. nvm.

    I am finished the plugin. Currently checking for bugs.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 4, 2016
  8. Offline


    Ummmm isn't this in the bukkit.yml config file by default? :confused:

    "[edit] autosave
    This bukkit.yml setting allows servers to set the number of ticks for each save-all event.
    Example Usage:
    A value of 1 will mean the server will attempt to autosave the world every tick.
    A value of 6000 will mean the server will attempt to autosave the world every 5 minutes.
    A value below 0 will be reset back to Bukkit's default.
    Minecraft default: 6000.
    Bukkit default: 0."
  9. Offline


    If you still want the plugin here it is:
    If I helped you in anyway I would appreciate it if you were to like one of my post's anyways, there are some features that you may like. Just do /help SimpleForceSave and it should be all good.

    Happy Mining,
    KyleSCA likes this.
  10. Offline


    The plugin still is not performing the command /save-all. Think of it like this, every time the server is shutdown (/stop) then perform the command /save-all. The reason why it's not saving correctly by default I don't know it says saving players and world but it only saves correctly when it performs THAT command.
  11. Offline


Thread Status:
Not open for further replies.

Share This Page