Plugins Folder Directory

Discussion in 'Plugin Development' started by Gingerbreadman, Dec 21, 2014.

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

    Gingerbreadman

    Hello Everyone I Was Wondering If There Is Anyway Of Getting The Plugins Folder Directory
     
  2. Offline

    Skionz

    @Gingerbreadman JavaPlugin#getDataFolder()
    Example:
    Code:
    onEnable() {
        while(true) {
            File file = new File(this.getDataFolder() + File.seperator + UUID.randomUUID().toString() + ".txt");
            file.createNewFile();
        }
    }
    EDIT: Do you mean the actual 'Plugins' folder, or your plugin's folder.
     
    Last edited: Dec 21, 2014
    ChipDev likes this.
  3. Offline

    mythbusterma

  4. Offline

    Gingerbreadman

    @Skionz I meant the actual plugin folder, and thank you!
     
  5. Offline

    Skionz

  6. Offline

    Gingerbreadman

    @Skionz Its fine, JavaPlugin#getDataFolder() worked perfectly xD
     
    Skionz likes this.
Thread Status:
Not open for further replies.

Share This Page