MidnightLib v0.2.0 for 21w19a

- MidnightConfig screens can be viewed from a new screen in the minecraft options
- Code cleanup
- Examples & Documentation
- New Methods
- Upgrade to 21w19a and Java 16

MidnightConfig v1.0.0:
 - The config screen no longer shows the entries of all instances of MidnightConfig
 - Compatible with servers!
 - Scrollable!
 - Comment support!
 - Fresh new design
This commit is contained in:
Motschen
2021-05-14 22:20:20 +02:00
parent a4be637128
commit 235042f30e
48 changed files with 563 additions and 313 deletions

3
src/main/java/eu/midnightdust/hats/web/HatLoader.java Normal file → Executable file
View File

@@ -26,8 +26,7 @@ public class HatLoader {
public static void init() {
CompletableFuture.supplyAsync(() -> {
try (Reader reader = new InputStreamReader(new URL(HATS_URL).openStream())) {
Map<UUID, PlayerHatData> playerData = GSON.fromJson(reader, HAT_TYPE);
return playerData;
return GSON.<Map<UUID, PlayerHatData>>fromJson(reader, HAT_TYPE);
} catch (MalformedURLException error) {
logger.log(Level.ERROR, "Unable to load player hats because of connection problems: " + error.getMessage());
} catch (IOException error) {