()
| 34 | } |
| 35 | |
| 36 | @Override |
| 37 | public void run() { |
| 38 | if (this.password.isEmpty()) { |
| 39 | Minecraft.getMinecraft().session = new Session(this.username, "", "", "mojang"); |
| 40 | this.status = ChatFormatting.GREEN + "Logged in. (" + this.username + " - offline name)"; |
| 41 | return; |
| 42 | } |
| 43 | |
| 44 | this.status = ChatFormatting.YELLOW + "Logging in..."; |
| 45 | final Session auth = createSession(username, password); |
| 46 | |
| 47 | if (auth == null) |
| 48 | this.status = ChatFormatting.RED + "Login failed!"; |
| 49 | else { |
| 50 | this.status = ChatFormatting.GREEN + "Logged in as " + auth.getUsername(); |
| 51 | Minecraft.getMinecraft().session = auth; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | public void setStatus(String status) { |
| 56 | this.status = status; |
nothing calls this directly
no test coverage detected