Facebook
From Pioter, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 208
  1. package th.pack.blacklist;
  2.  
  3. import net.minecraft.client.Minecraft;
  4.  
  5. import java.io.IOException;
  6. import java.net.URL;
  7. import java.util.Scanner;
  8.  
  9. public class BlacklistManage {
  10.        
  11.  
  12.     private static String information = "Witam" +
  13.             "nJesli widzisz ta wiadomosc to prawdopodobnie odkodowales paczke." +
  14.             "nJesli odkodowales paczke bardzo Cie prosze o nie udostepnianie tego na internet." +
  15.             "nAni ja ani ty nie chcemy aby powstaly kolejne paczki typu bartek pack 8.0.";
  16.  
  17.     public static void check(Minecraft mc) {
  18.         try {
  19.             String name = mc.getSession().getUsername();
  20.             String uuid;
  21.             try {
  22.                 uuid = mc.getSession().getProfile().getId().toString();
  23.             } catch (NullPointerException e) {
  24.                 uuid = null;
  25.             }
  26.  
  27.             Scanner scanner = new Scanner(new URL("http://xxx/").openStream());
  28.             while (scanner.hasNextLine()) {
  29.                 String[] split = scanner.nextLine().split(":");
  30.                 String s = split[0];
  31.                 String reason = split[1];
  32.                 if (name.equalsIgnoreCase(s)) {
  33.                     mc.displayGuiScreen(new BlacklistGui(reason));
  34.                 }
  35.                 if (uuid != null && uuid.equals(s)) {
  36.                     mc.displayGuiScreen(new BlacklistGui(reason));
  37.                 }
  38.             }
  39.         } catch (IOException e) {
  40.             e.printStackTrace();
  41.         }
  42.     }
  43. }