diff --git a/CHANGELOG.md b/CHANGELOG.md index 6023e416..3ff1bcd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/core/src/main/java/com/github/games647/fastlogin/core/mojang/MojangApiConnector.java b/core/src/main/java/com/github/games647/fastlogin/core/mojang/MojangApiConnector.java index 890828e7..fd518c07 100644 --- a/core/src/main/java/com/github/games647/fastlogin/core/mojang/MojangApiConnector.java +++ b/core/src/main/java/com/github/games647/fastlogin/core/mojang/MojangApiConnector.java @@ -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;