private static final String authString = "OK";
private final String params;
private final Runnable runnable;
public ClientLoginAuth(String hash, Runnable runnable) {
VanillaPlugin p = VanillaPlugin.getInstance();
String encodedUser = "";
String encodedId = "";
try {
encodedUser = URLEncoder.encode(p.getUsername(), "UTF-8");
encodedId = URLEncoder.encode(p.getSessionId(), "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
this.params = "user=" + encodedUser + "&sessionId=" + encodedId + "&serverId=" + hash;
System.out.println(params);