Advertisement
Lynxxxie

Untitled

Jul 3rd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. package me.aristhena.latestver;
  2.  
  3. import java.util.concurrent.*;
  4. import java.net.*;
  5. import java.io.*;
  6. import me.aristhena.client.*;
  7. import javax.swing.*;
  8. import java.awt.*;
  9. import java.awt.List;
  10.  
  11. import me.aristhena.utils.*;
  12. import java.util.*;
  13.  
  14. public class LatestVersion extends Thread
  15. {
  16. @Override
  17. public void run() {
  18. final boolean success = false;
  19. try {
  20. final CopyOnWriteArrayList<String> ver = new CopyOnWriteArrayList<String>();
  21. final URL url = new URL("https://pastebin.com/raw/NRigxZMv");
  22. final BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
  23. String inputLine;
  24. while ((inputLine = in.readLine()) != null) {
  25. if (inputLine.startsWith(String.valueOf(Client.getVersion()))) {
  26. String lynx = JOptionPane.showInputDialog("Username: ");
  27. String password = JOptionPane.showInputDialog("Password: ");
  28. if(lynx.equalsIgnoreCase("lynx")) {
  29. if(password.equalsIgnoreCase(Client.passwordlynx)) {
  30. JOptionPane.showMessageDialog(null, "Enjoy Mint, Lynx!");
  31. Client.setLatest(true);
  32. }
  33. }
  34. if(lynx.equalsIgnoreCase("saphar")) {
  35. if(password.equals(Client.passwordsaphar())) {
  36. JOptionPane.showMessageDialog(null, "Enjoy Mint, Saphar!");
  37. Client.setLatest(true);
  38. }
  39.  
  40. }
  41. else if(!lynx.equalsIgnoreCase("lynx") && !lynx.equalsIgnoreCase("saphar")){
  42. JOptionPane.showMessageDialog(null, ":(");
  43. Client.setLatest(false);
  44. System.exit(0);
  45. ClientUtils.mc().shutdown();
  46. ClientUtils.mc().running = false;
  47. }
  48. }
  49. else {
  50. Client.setLatest(false);
  51. JOptionPane.showMessageDialog(null, "You're running an old version! Please update to the newest version.");
  52. System.exit(0);
  53. ClientUtils.mc().shutdown();
  54. ClientUtils.mc().running = false;
  55. }
  56. in.close();
  57. }
  58. }
  59. catch (Exception ex) {}
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement