diff --git a/proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java b/api/src/main/java/net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java similarity index 100% rename from proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java rename to api/src/main/java/net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java diff --git a/proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveMap.java b/api/src/main/java/net/md_5/bungee/util/CaseInsensitiveMap.java similarity index 100% rename from proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveMap.java rename to api/src/main/java/net/md_5/bungee/util/CaseInsensitiveMap.java diff --git a/proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveSet.java b/api/src/main/java/net/md_5/bungee/util/CaseInsensitiveSet.java similarity index 100% rename from proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveSet.java rename to api/src/main/java/net/md_5/bungee/util/CaseInsensitiveSet.java diff --git a/proxy/src/test/java/net/md_5/bungee/util/CaseInsensitiveTest.java b/api/src/test/java/net/md_5/bungee/util/CaseInsensitiveTest.java similarity index 100% rename from proxy/src/test/java/net/md_5/bungee/util/CaseInsensitiveTest.java rename to api/src/test/java/net/md_5/bungee/util/CaseInsensitiveTest.java diff --git a/module/reconnect-yaml/src/main/java/net/md_5/bungee/module/reconnect/yaml/YamlReconnectHandler.java b/module/reconnect-yaml/src/main/java/net/md_5/bungee/module/reconnect/yaml/YamlReconnectHandler.java index a7c796688..5c88bb852 100644 --- a/module/reconnect-yaml/src/main/java/net/md_5/bungee/module/reconnect/yaml/YamlReconnectHandler.java +++ b/module/reconnect-yaml/src/main/java/net/md_5/bungee/module/reconnect/yaml/YamlReconnectHandler.java @@ -14,6 +14,7 @@ import java.util.logging.Level; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.util.CaseInsensitiveMap; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.error.YAMLException; @@ -24,7 +25,7 @@ public class YamlReconnectHandler extends AbstractReconnectHandler private final File file = new File( "locations.yml" ); private final ReadWriteLock lock = new ReentrantReadWriteLock(); /*========================================================================*/ - private Map data; + private CaseInsensitiveMap< String> data; @SuppressWarnings("unchecked") public YamlReconnectHandler() @@ -34,7 +35,7 @@ public class YamlReconnectHandler extends AbstractReconnectHandler file.createNewFile(); try ( FileReader rd = new FileReader( file ) ) { - data = yaml.loadAs( rd, Map.class ); + data = new CaseInsensitiveMap<>( yaml.loadAs( rd, Map.class ) ); } } catch ( YAMLException ex ) { @@ -47,7 +48,7 @@ public class YamlReconnectHandler extends AbstractReconnectHandler if ( data == null ) { - data = new HashMap<>(); + data = new CaseInsensitiveMap<>(); } } diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index a2bb7c573..ac9d807ac 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -6,6 +6,8 @@ import java.math.BigInteger; import java.net.InetSocketAddress; import java.net.URLEncoder; import java.security.MessageDigest; +import java.util.Date; +import java.util.UUID; import java.util.logging.Level; import javax.crypto.SecretKey; import lombok.Getter; @@ -305,6 +307,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection if ( obj != null ) { UUID = obj.getId(); + UUID = UUID.substring(0, 8) + "-" + UUID.substring(8, 12) + "-" + UUID.substring(12, 16) + "-" + UUID.substring(16, 20) + "-" + UUID.substring(20, 32); + java.util.UUID u = java.util.UUID.fromString( UUID ); + System.out.println( u.version() ); + System.out.println( new Date(u.clockSequence()) ); finish(); return; }