From 697e478e040a83021129f8495b0f8e2dc8de398a Mon Sep 17 00:00:00 2001 From: rtm516 Date: Mon, 27 Apr 2020 21:49:05 +0100 Subject: [PATCH] Fixed Sponge plugin user auths config loading (#445) --- .../platform/sponge/GeyserSpongeConfiguration.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bootstrap/sponge/src/main/java/org/geysermc/platform/sponge/GeyserSpongeConfiguration.java b/bootstrap/sponge/src/main/java/org/geysermc/platform/sponge/GeyserSpongeConfiguration.java index be4923e2b..e60a5c3ef 100644 --- a/bootstrap/sponge/src/main/java/org/geysermc/platform/sponge/GeyserSpongeConfiguration.java +++ b/bootstrap/sponge/src/main/java/org/geysermc/platform/sponge/GeyserSpongeConfiguration.java @@ -26,17 +26,13 @@ package org.geysermc.platform.sponge; import lombok.AllArgsConstructor; - import ninja.leaping.configurate.ConfigurationNode; - import org.geysermc.common.IGeyserConfiguration; import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public class GeyserSpongeConfiguration implements IGeyserConfiguration { @@ -60,7 +56,8 @@ public class GeyserSpongeConfiguration implements IGeyserConfiguration { if (node.getNode("userAuths").getValue() == null) return; - for (String key : (List) node.getNode("userAuths").getValue()) { + List userAuths = new ArrayList(((LinkedHashMap)node.getNode("userAuths").getValue()).keySet()); + for (String key : userAuths) { userAuthInfo.put(key, new SpongeUserAuthenticationInfo(key)); } }