Filled FileDeleter (Closed)

Discussion in 'Archived: Plugin Requests' started by PureGermanity, Jun 19, 2014.

  1. Offline

    PureGermanity

    Plugin category: Developer Tools

    Suggested name: FileDeleter

    What I would like: I would like to have a plugin that can delete specific files, every time a server stops. It should be able to add a file to a configuration file via command (seen below), and the filename should be with extension, example: settings.cfg NOT settings. It should be able to add files in the config as well, but it is not really important.

    Ideas for commands: /filedelete <pluginfoldername> <filename>

    Ideas for permissions: file.delete

    When I'd like it by: ASAP

    Thanks in the future! :D
     
  2. Offline

    timtower Administrator Administrator Moderator

    PureGermanity have something that exactly does this, will give a link when I get to my laptop.
     
  3. Offline

    PureGermanity

    ;D Thanks
     
  4. Offline

    timtower Administrator Administrator Moderator

    Resoluciones and PureGermanity like this.
  5. Offline

    PureGermanity

  6. Offline

    timtower Administrator Administrator Moderator

    Depends on the file.
     
  7. Offline

    PureGermanity

    it's a .db file

    I need this for the scoreboardstats to set every tome the server restarts
     
  8. Offline

    timtower Administrator Administrator Moderator

    Do you get an error? And if it can't delete a file then it should do that when the server stops.
     
  9. Offline

    PureGermanity

    @timtower

    Loading libraries, please wait...
    [18:16:42 INFO]: Starting minecraft server version 1.7.2
    [18:16:42 INFO]: Loading properties
    [18:16:42 INFO]: Default game type: SURVIVAL
    [18:16:42 INFO]: Generating keypair
    [18:16:42 INFO]: Starting Minecraft server on *:25565
    [18:16:42 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.2-R0.3-b3020jnks (MC: 1.7.2) (Implementing API version 1.7.2-R0.3)
    [18:16:42 INFO]: [FileDeleter] Loading FileDeleter v0.0.1
    [18:16:42 INFO]: [ScoreboardStats] Loading ScoreboardStats v0.7.5
    [18:16:42 INFO]: [FileDeleter] Enabling FileDeleter v0.0.1
    [18:16:42 INFO]: [FileDeleter] server.log
    [18:16:42 INFO]: [FileDeleter] other.file
    [18:16:42 INFO]: [FileDeleter] things that dont exist wont get deleted but wont cause errors either
    [18:16:42 INFO]: [FileDeleter] ScoreboardStats.db
    [18:16:42 INFO]: Preparing level "world"
    [18:16:42 INFO]: Preparing start region for level 0 (Seed: -3027607080130206540)
    [18:16:42 INFO]: ----- Bukkit Auto Updater -----
    [18:16:42 INFO]: It appears that you're running a Beta Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
    [18:16:42 INFO]: If you would like to be kept informed about new Beta Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'beta'.
    [18:16:42 INFO]: With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
    [18:16:42 INFO]: If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
    [18:16:42 INFO]: ----- ------------------- -----
    [18:16:43 INFO]: Preparing start region for level 1 (Seed: -3027607080130206540)
    [18:16:44 INFO]: Preparing start region for level 2 (Seed: -3027607080130206540)
    [18:16:44 INFO]: [ScoreboardStats] Enabling ScoreboardStats v0.7.5
    [18:16:44 INFO]: DataSourcePool [ScoreboardStats] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    [18:16:45 INFO]: DatabasePlatform name:ScoreboardStats platform:sqlite
    [18:16:45 INFO]: SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    [18:16:45 INFO]: Entities enhanced[0] subclassed[1]
    [18:16:45 INFO]: runScript
    [18:16:45 INFO]: executing 1 of 1 create table IF NOT EXISTS PlayerStats ( playername varchar(16) p...
    [18:16:45 INFO]: ... end of script
    [18:16:45 INFO]: Registered replacers: [PlayerPingVariable, GeneralVariables, StatsVariables]
    [18:16:45 INFO]: Server permissions file permissions.yml is empty, ignoring it

    [18:16:45 INFO]: Done (2.934s)! For help, type "help" or "?"



    This does not seem to an error to me, but it never deletes the file. The file path is FileDeleter(The server name)/plugins/ScoreBoardStats/ScoreboardStats.db

    EDIT: I did make it on an empty/fresh server
     
  10. Offline

    Alster551

  11. Offline

    PureGermanity

    What command?
     
  12. Offline

    timtower Administrator Administrator Moderator

  13. Offline

    PureGermanity

    timtower
    timeout: 583200000
    delete:
    - server.log
    - other.file
    - things that dont exist wont get deleted but wont cause errors either
    - ScoreboardStats.db
     
  14. Offline

    timtower Administrator Administrator Moderator

    PureGermanity It won't search for the file on its own. It only looks where you tell it to look.
     
  15. Offline

    PureGermanity

    So how do I make it do that? timtower
     
  16. Offline

    timtower Administrator Administrator Moderator

    PureGermanity You put in the full file path to the file relative to the server
     
  17. Offline

    PureGermanity

    Starting from where (the path) from the bukkit folder, like this: plugins/ScoreboardStats/ScoreboardStats.db

    EDIT: Nevermind it works!
     
  18. Offline

    Alster551

    ah right, understood it wrong
     
  19. Offline

    timtower Administrator Administrator Moderator

Share This Page