Update Checker | GhostLeaks
Welcome at the GhostLeaks
We bringing a new era of leaks

Update Checker

  • Hey Guest!

    Our hosting provider or CloudFlare won't reply to any DMCA takedown notice!

    If you wish TakeDown of your resource then,
    Contact us at discord: TheSpace#0829

    Please allow up to a week for a discord reply!
  • Hey Guest !

    In order to be able to download resources,
    You need to register. Register by the Button at upside at right.

    Thanks for reading me :)
  • Hey Guest !

    Please don't use randomly generated or written names (example: dfdfasdf)
    We'll ban users with those names because they're Spam-Like.
    To prevent this! Please use normal names while registration!


Web Developer
Staff member
Web developer
Dec 25, 2020
To add a our api to check for updates, you will need to add the following code right under the onEnable().

    public void update() {
        String newVersion = getDescription().getVersion();
        String api = "https://ghostleaks.eu/api/v2/update.php";
        URLConnection localURLConnection = new URL(api + "?resource=" + "%%__RESOURCE__%%" + "&version=" + newVersion).openConnection();
        localURLConnection.setRequestProperty("User-Agent", "Mozilla/5.0");
        BufferedReader localBufferedReader = new BufferedReader(new InputStreamReader(localURLConnection.getInputStream(), Charset.forName("UTF-8")));
        StringBuilder localStringBuilder = new StringBuilder();
        String str1;
        while ((str1 = localBufferedReader.readLine()) != null) {
        String str2 = localStringBuilder.toString();
        ConsoleCommandSender console = getServer().getConsoleSender();
        if(str2.equals("UPDATE")) {
            console.sendMessage("[GhostLeaks] An update has been found!");
            console.sendMessage("[GhostLeaks] https://ghostleaks.eu/resources/" + "%%__RESOURCE__%%");
        if(str2.equals("ERR")) {
            console.sendMessage("[GhostLeaks] Error while checking for updates!");
        if(str2.equals("CURRENT")) {
               console.sendMessage("[GhostLeaks] You are running the latest version!");
        if (str2.equals(null)){
            console.sendMessage("[GhostLeaks] Resource could not be found!");
      catch (IOException localIOException)
          System.out.print("Error: Please ensure your running the latest version!");
Once added, you will need to add
in the onEnable() section and then your done.



Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.