Advertisement
Guest User

Untitled

a guest
Sep 14th, 2018
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public class Updater {
  2.  
  3. public static final Updater INSTANCE = new Updater();
  4.  
  5. public void runCheck() throws IOException {
  6. if(WebUtils.get("<pastebin>").contains("your newest build")) {
  7. System.out.println("Newest version!");
  8. } else {
  9. System.out.println("Downloading newest version");
  10.  
  11. downloadJAR();
  12. }
  13. }
  14. public void downloadJAR() throws MalformedURLException, IOException {
  15. FileUtils.copyURLToFile(new URL("<url to jar>"), Fever.INSTANCE.getJAR());
  16. }
  17.  
  18.  
  19.  
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement