Vinetos

Online or Crack

Apr 18th, 2015
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1.  
  2. @Override
  3. public void onEnable() {
  4. getServer().getPluginManager().registerEvents(this, this);
  5. }
  6.  
  7. @EventHandler
  8. public void onJoin(PlayerJoinEvent e){
  9. Player p = e.getPlayer();
  10. try {
  11. get(p);
  12. } catch (Exception e1) {
  13. // TODO Auto-generated catch block
  14. e1.printStackTrace();
  15. }
  16. }
  17.  
  18. public static void get(Player p) throws Exception {
  19.  
  20. URL oracle = new URL("https://minecraft.net/haspaid.jsp?user="+p.getName());
  21. BufferedReader in = new BufferedReader(
  22. new InputStreamReader(oracle.openStream()));
  23.  
  24. String inputLine = in.readLine();
  25. if(inputLine == null){
  26. System.out.println("Impossible de vérifié si le joueur est connécté avec une version Officielle ou non !");
  27.  
  28. }else if(inputLine.equalsIgnoreCase("true")){
  29. System.out.println(p.getName()+"est en Officielle !");
  30. }else if(inputLine.equalsIgnoreCase("false")){
  31. System.out.println(p.getName()+"est en Crack !");
  32. }
  33. in.close();
  34. }
  35.  
  36. }
Add Comment
Please, Sign In to add comment