Bukkit Directory Structure

Discussion in 'Bukkit Help' started by Azraeil, Jan 17, 2011.

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

    Azraeil

    When I look at my hMod folder, I'm a little disgusted by the huge amount of discontinuity with the way plugins store their settings and preferences. Currently, my server folder listing looks a little something like this:
    Code:
    banned-ips.txt
    banned-players.txt
    cauldron-recipes.txt
    craftbook-books.txt
    craftbook.properties
    cuboids
    DeathNotifyMessages.txt
    groups.txt
    homes.txt
    iConomy
    items.txt
    kits.txt
    logs
    Minecraft_Mod.jar
    minecraft_server_backup.jar
    minecraft_server.jar
    motd.txt
    mysql-connector-java-bin.jar
    news.txt
    obituary_messages.txt
    ops.txt
    plugins
    register.txt
    repaircosts.properties
    rules.txt
    server.log
    server.log.lck
    server_nogui.sh
    server.properties
    sevenzipjbinding-AllPlatforms.jar
    world
    SQL
    stargates
    stargate.txt
    Updatr
    Updatr.jar
    Updatr.sh
    users.txt
    warps.txt
    whitelist.txt
    worldedit.properties
    worldedit-restrictions.txt
    
    Now surely there has got to be a better way to organize all of these files. Could we possibly see something akin to the way that any normal operating system would house these files? I'm thinking something along the lines of

    Code:
    /data
    /plugins
    /preferences
    /system
    /worlds
    /plugins would of course store all of the plugins the system had access to.

    /preferences would hold all setting/preference related material. The structure of the preferences directory would be something along the lines of /preferences/plugin_name/stuff. This would make it easy to store and reference preferences all while knowing exactly what a .preference file contains preferences for. Ideally, the server would also store it's preferences/settings in the same format. I suppose the server would simply use system as its directory name. I would love to see all those server settings files stored in a central location (or at least a location isn't the root of the server directory). The goal would be that to get a plugin up and running, you would simply need the plugin.jar and upon the first run of the plugin, it would create the necessary files/folders required for operation. This would also mean that if you ever messed up a plugin and wanted to just do a reset on it, you would just need to delete the associated directory in the preference folder.

    /data would subsequently hold all of the data relating to the plugins. Any plugin that needs to store information would create a directory in the data directory in their own folder. /data/plugin_name/stuff_to_store would be my ideal layout. I don't use SQL and am not exactly sure how that sort of data is stored. I suppose if possible, it would follow the same sort of format except a SQL directory could be made in addition to the data directory.

    /system would contain the system files required by the server to operate. The data contained within shouldn't have any bearing on the user files stored by the world, nor should it contain any server specific files. Ideally, you should have nearly identical system folders with other servers of the same version.

    /worlds contains the worlds saved by the server. I imagine that some servers would host more than one world. /worlds/world_name would be the structure of this folder. I'm assuming the world used by the server would be stored in some kind of preference file as it is already.

    Please make the directory structure of Bukkit and the associated plugins a little less convoluted :p
     
  2. Offline

    Killie01

    I like that but
    Isnt it going to be database only
    Mysql ans sqlite
     
  3. Offline

    nichiatu

    what...
     
  4. Offline

    Killie01

    Bukkit
     
  5. Offline

    8e8

    There was an update recently to give each plugin their own plugin folder (optional) so you could store the necessary files in there. That folder would be inside the plugins folder. AFAIK that's how it works. I haven't gone down that road yet myself.

    There were also command line parameters to set the location of your plugins/world/config directories, but that seemed to have broke with one of the recent updates. I'm sure it will be added back if it hasn't already.
    [​IMG]
     
  6. Offline

    Azraeil

    I think I'm requesting an official structure to the whole Minecraft server system. As of now, it seems that it's up to the plugin developers with regards as to where they want to put their stuff. I just think plugin developers should be given a sort of structure to follow when it comes to placing their support files. I suppose another option would be to provide a way to interface with those files with Bukkit itself. Some sort of hook that the plugin could make to get bukkit to read/write those configuration files.
     
  7. Offline

    feverdream

    '

    Not true. Plugins that need to store large amounts of data will use sqlite, basic config options are flat file text files.
     
  8. Offline

    Killie01

    okidoki
     
Thread Status:
Not open for further replies.

Share This Page