Delete Plugin?

Discussion in 'Spigot Plugin Development' started by _PowerFox_, May 29, 2016.

  1. Hello there,

    how can I delete the plugin in my plugins Folder?

    mfg
     
    • Funny Funny x 1
  2. Stop the server, go to the /plugins folder, right click. delete.
     
  3. Use right click, work great
     
  4. sorry :D I mean using a plugin Code while running :D
     
  5. why would you want to do that? the only reason i could think of wanting to do that is to break somones server.
     
  6. No, it will help me in my cloudsystem with the Server Management. I don't would like to grief :D
     
  7. rm -rf file.jar
     
  8. My System is Windows, not Linux...
     
  9. but on Linux it will shown like this, or?


    ShellCommand("rm -r " + file.getName().toString());

    private String ShellCommand(String command) {
    StringBuffer output = new StringBuffer();
    Process p;
    try {
    p = Runtime.getRuntime().exec(command);
    p.waitFor();
    InputStreamReader inreader = new InputStreamReader(p.getInputStream());
    BufferedReader reader = new BufferedReader(inreader);
    String line = "";
    while ( (line = reader.readLine() ) != null) {
    output.append(line + "\n");
    }
    } catch (Exception e) {
    e.printStackTrace();
    }
    return output.toString();
    }
     
  10. Loop through files in there.
    Open each jar and check plugin.yml.
    If it's the same info as yours, delete the whole jar.
    Else,
    go on looping.

    You can also check MD5, a little file if it exists in every jar, but only in yours,
    and so on.