Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.aristhena.latestver;
- import java.util.concurrent.*;
- import java.net.*;
- import java.io.*;
- import me.aristhena.client.*;
- import javax.swing.*;
- import java.awt.*;
- import java.awt.List;
- import me.aristhena.utils.*;
- import java.util.*;
- public class LatestVersion extends Thread
- {
- @Override
- public void run() {
- final boolean success = false;
- try {
- final CopyOnWriteArrayList<String> ver = new CopyOnWriteArrayList<String>();
- final URL url = new URL("https://pastebin.com/raw/NRigxZMv");
- final BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- if (inputLine.startsWith(String.valueOf(Client.getVersion()))) {
- String lynx = JOptionPane.showInputDialog("Username: ");
- String password = JOptionPane.showInputDialog("Password: ");
- if(lynx.equalsIgnoreCase("lynx")) {
- if(password.equalsIgnoreCase(Client.passwordlynx)) {
- JOptionPane.showMessageDialog(null, "Enjoy Mint, Lynx!");
- Client.setLatest(true);
- }
- }
- if(lynx.equalsIgnoreCase("saphar")) {
- if(password.equals(Client.passwordsaphar())) {
- JOptionPane.showMessageDialog(null, "Enjoy Mint, Saphar!");
- Client.setLatest(true);
- }
- }
- else if(!lynx.equalsIgnoreCase("lynx") && !lynx.equalsIgnoreCase("saphar")){
- JOptionPane.showMessageDialog(null, ":(");
- Client.setLatest(false);
- System.exit(0);
- ClientUtils.mc().shutdown();
- ClientUtils.mc().running = false;
- }
- }
- else {
- Client.setLatest(false);
- JOptionPane.showMessageDialog(null, "You're running an old version! Please update to the newest version.");
- System.exit(0);
- ClientUtils.mc().shutdown();
- ClientUtils.mc().running = false;
- }
- in.close();
- }
- }
- catch (Exception ex) {}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement