Advertisement
Guest User

Untitled

a guest
Jun 25th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. package me.callofcaos.lorien.utils.yggdrasil;
  2.  
  3. import java.net.Proxy;
  4.  
  5. import net.minecraft.util.Session;
  6.  
  7. import com.mojang.authlib.Agent;
  8. import com.mojang.authlib.exceptions.AuthenticationException;
  9. import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
  10. import com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication;
  11.  
  12. /*
  13. * Author: Opim10
  14. * Version: 1
  15. * Use: Login to Minecraft with Yggdrasil;
  16. */
  17.  
  18. public class YggdrasilAuthenticator {
  19.  
  20. public YggdrasilPayload Payload = new YggdrasilPayload();
  21. public String Username;
  22. public String Password;
  23. private Session session;
  24.  
  25. public YggdrasilAuthenticator(String Username, String Password)
  26. {
  27. this.Username = Username;
  28. this.Password = Password;
  29. }
  30.  
  31. public boolean login(){
  32. if(Password != "" && Password != null)
  33. {
  34. Session AuthResponse = Payload.loginPassword(this.Username, this.Password);
  35. if(AuthResponse != null){
  36. session = (AuthResponse);
  37. return true;
  38. }
  39.  
  40. }else{
  41. Session AuthResponseCrack = Payload.loginCrack(this.Username);
  42. session = (AuthResponseCrack);
  43. return true;
  44. }
  45.  
  46. return false;
  47. }
  48.  
  49. public Session getSession(){
  50. return session;
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement