-
-
Save Plazmaz/320e15309ef0b2b6c904 to your computer and use it in GitHub Desktop.
Proper date display for outdatedtexturexception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mojang.authlib.minecraft; | |
| import com.mojang.authlib.GameProfile; | |
| import java.util.Calendar; | |
| import java.util.Date; | |
| import java.util.UUID; | |
| public class InsecureTextureException extends RuntimeException { | |
| public InsecureTextureException(String message) { | |
| super(message); | |
| } | |
| public static class MissingTextureException extends InsecureTextureException { | |
| public MissingTextureException() { | |
| super("No texture information found"); | |
| } | |
| } | |
| public static class WrongTextureOwnerException extends InsecureTextureException { | |
| private final GameProfile expected; | |
| private final UUID resultId; | |
| private final String resultName; | |
| public WrongTextureOwnerException(GameProfile expected, UUID resultId, String resultName) { | |
| super("Decrypted textures payload was for another user (expected " + expected.getId() + "/" + expected.getName() + " but was for " + resultId + "/" + resultName + ")"); | |
| this.expected = expected; | |
| this.resultId = resultId; | |
| this.resultName = resultName; | |
| } | |
| } | |
| public static class OutdatedTextureException extends InsecureTextureException { | |
| private final Date validFrom; | |
| private final Calendar limit; | |
| public OutdatedTextureException(Date validFrom, Calendar limit) { | |
| super("Decrypted textures payload is too old (" + validFrom + ", but we need it to be at least " + limit.getTime() + ")"); | |
| this.validFrom = validFrom; | |
| this.limit = limit; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment