Filled Delete Files on Server Stop

Discussion in 'Archived: Plugin Requests' started by themindstormman, Feb 26, 2013.

  1. Offline

    themindstormman

    I am looking for a plugin that will delete the bpermissions user files and essentials user files whenever the server stops/restarts. Anyone know of a plugin to do this or able to make me one? This would be much appreciated. Thanks.
     
  2. Offline

    YoshiGenius

    What would be the use of this?

    Edit: Also, what type of plugins are you developing for your server. I may be interested in joining.
     
  3. Offline

    themindstormman

    Well I am setting up a server for dwarves vs. zombies. After every game I would like the users file to reset so all the dwarves and zombies are set back to the default class. Then they will get the default tag again and be able to choose a new class next game. If you want to join my server you are welcome but we are not online yet. Its built on the ashes of an old server so when i do put it up we will be instantly popular though. Anyways if you could make a simple plugin where I would put a link to all the files i want deleted, in a config file. Then, every time the server is stopping it deletes those.
     
  4. Offline

    Jeremaster103

    I'm not quite sure you can do that with a plugin, but you can edit your server startup script to delete those files for you. Make it go into your bpermissions or essentials folder (using 'cd') and use 'rm [nameOfFile]'. Put these lines AFTER the one that runs craftbukkit. (You know, the 0_0Xmx 0_0Xms -jar craftbukkit.jar or whatever it is). That will make it delete the files when the server shuts down.

    Hope that helps!
     
  5. Offline

    kukelekuuk00


    Wouldn't it be more beneficial to make a plugin that temporarily sets people to a group and resets them when a game ends instead of a plugin that deletes your users.yml?
     
  6. Offline

    themindstormman

    I'm sure it would be, but how would a plugin move every player (Online or Not) to a permissions group when I type a command? Any plugins people know of?
     
  7. Offline

    Ne0nx3r0

    Just alter your startup script so that after it runs it deletes the files, then loops back to the server startup. This way the files are cleaned whenever you run /stop.
     
  8. Offline

    themindstormman

    How do I edit the startup scripts?
     
  9. Offline

    Ne0nx3r0

  10. Offline

    themindstormman

    I use BukkitGUI to manage my server. Could you give me some code to add to a startup script to delete a file, so I can put that in a .bat

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  11. Offline

    number1_Master

    Assuming you are windows, I would create a startup script for you but I am a Mac. I'm used to Shell Script, not Batch.
     
  12. Offline

    themindstormman

    Yeah I'm windows

    I still need a answer. Someone give me something clear and meaningful please.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  13. Offline

    RingOfStorms

  14. Offline

    themindstormman

    Yay I got it to work! RingOfStorms was correct its
    del "____\users.yml"
     
  15. Offline

    Bertware

    with the GUI you can:
    • create a .bat file "deletefiles.bat". Then use the BukkitGUI task manager to run this file when the server stops
    • Create a new task in the GUI, on server stop, shellexecute "del "____\users.yml"
     
  16. Offline

    themindstormman

    Okay, I will try that right now! Thanks, I really like BukkitGUI and now I can still use it, Awesome!

    It worked! The first one worked anyway, the second just gave me an error. Anyways thank you so much!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016

Share This Page