forked from TuxCoding/FastLogin
Fix NPE for Mojang API connector
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
### 1.11
|
||||
|
||||
* Optimize issue template
|
||||
* Use Instant for timestamps
|
||||
* Migrate SLF4J logging (Fixes #177)
|
||||
* Use Gson's TypeAdapter for more type safety
|
||||
* Add support for IPv6 proxies
|
||||
* Shared configuration implementation for easier maintained code
|
||||
* Use Gson for json parsing, because it's supported on all platforms and removes code duplicates
|
||||
|
@ -22,6 +22,7 @@ import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -55,7 +56,7 @@ public class MojangApiConnector {
|
||||
private final SSLSocketFactory sslFactory;
|
||||
private final int rateLimit;
|
||||
|
||||
private Instant lastRateLimit;
|
||||
private Instant lastRateLimit = Instant.now().minus(10, ChronoUnit.MINUTES);
|
||||
|
||||
protected final Gson gson = new GsonBuilder().registerTypeAdapter(UUID.class, new UUIDTypeAdapter()).create();
|
||||
protected final Logger logger;
|
||||
|
Reference in New Issue
Block a user