Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Auto downloader + Force patch #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Maximvdw
Copy link

@Maximvdw Maximvdw commented Sep 9, 2014

java -jar SpigotPatcher.jar %SPIGOT1649BUILD% download spigot.jar
Will download the latest update

specifying a path still works

java -jar %INPUT% %INPUT.bps% %OUTPUT% force
will overwrite the OUTPUT

java -jar SpigotPatcher.jar <SPIGOT1649BUILD> download spigot.jar
Will download the latest update

specifying a path still works

java -jar <INPUT> <INPUT.bps> <OUTPUT> force
will overwrite the OUTPUT
+ Files.hash(outputFile, Hashing.md5()));
}

public static File downloadPatch() {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main downloader for the patch.
Returns file of downloaded patch (could be used in GUI if threaded)

@FarisR99
Copy link

FarisR99 commented Sep 9, 2014

Not sure if it is just my iPad but your code's formatting is horrible here. That's my contribution. 👍

@Lemmmy
Copy link

Lemmmy commented Sep 9, 2014

+KingFaris10

@Maximvdw
Copy link
Author

Maximvdw commented Sep 9, 2014

I blame apple

@Lemmmy
Copy link

Lemmmy commented Sep 9, 2014

I don't blame Apple. I've looked on it on a Windows machine, two Linuxes and an Android and the formatting is terrible. I've also opened the file in a code editor and I can confirm that you have incorrect formatting.

@Maximvdw
Copy link
Author

Maximvdw commented Sep 9, 2014

Well the formatting is irrelevant (it looks good for me tho)

@Lemmmy
Copy link

Lemmmy commented Sep 9, 2014

What kind of conventions do you use?

On Tue, Sep 9, 2014 at 9:36 PM, Maxim Van de Wynckel <
[email protected]> wrote:

Well the formatting is irrelevant (it looks good for me tho)


Reply to this email directly or view it on GitHub
#3 (comment).

@FarisR99
Copy link

FarisR99 commented Sep 9, 2014

^ What LemonLake said...
It's like - one code section per line... argh. I mean - even md_5's formatting isn't good - but I can handle his because a lot of people who either:

  1. Are new to programming. (which is definitely not what md_5 is)
  2. Moved from C or C++ to Java. (Don't think this applies to md_5)
  3. Are rebels and don't want to follow Oracle's Java programming conventions. (This is what md_5 is 👍)
    Usually program like he does. Though yours, I can't handle seeing it. Use something like IntelliJ and then use the default format (though still ugly - I have mine modified) to format your code. Unlike Eclipse, IntelliJ unfortunately doesn't auto-format new lines, so you'll have to delete the new line bit and then format and it'll automatically fix the rest. (I'm not sure if there's a setting in IntelliJ to format new lines)

Some people don't like Eclipse's formatting
@Maximvdw
Copy link
Author

Maximvdw commented Sep 9, 2014

Blame eclipse then, can't believe I woke up to fix this ....
http://i.gyazo.com/7e04924a034387ee30b4590f336f1989.png

It looks good in eclipse, for some reason the eGit ruins the formatting on pushing.

@Lemmmy
Copy link

Lemmmy commented Sep 9, 2014

Oh god the pain
On 9 Sep 2014 22:44, "Maxim Van de Wynckel" [email protected]
wrote:

Blame eclipse then, can't believe I woke up to fix this ....
http://i.gyazo.com/7e04924a034387ee30b4590f336f1989.png


Reply to this email directly or view it on GitHub
#3 (comment).

@FarisR99
Copy link

I think the formatting's changed, not sure. But it looks a bit better I think, but there's still the fact that you have so many new lines, e.g.
System
.out
.println()

Just use System.out.println() on one line. Same as strings.

@Maximvdw
Copy link
Author

We aren't here to discuss formatting.............. its a pull request for an updater

@FarisR99
Copy link

It's a pull request for an updater with code made by you which will (if accepted) be published officially with SpigotPatcher's repository. I'm sorry, but we don't want to see ugly code in SpigotPatcher. Formatting is part of a PR. Bukkit rejected PRs that didn't follow a certain formatting.

System.out
.println("\tPlease download it manually from: http://spigotmc.org/spigot-updates/");
}
return null;
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No } Needed, Ending with 2x } (1 for the method downloadPatch) and 1 for the class

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants