diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BungeeManager.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BungeeManager.java index 47601553..343d6c2b 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BungeeManager.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BungeeManager.java @@ -106,15 +106,16 @@ public class BungeeManager { Path legacyFile = plugin.getPluginFolder().resolve(LEGACY_FILE_NAME); try { if (Files.notExists(proxiesFile)) { - if (Files.notExists(legacyFile)) { - Files.createFile(proxiesFile); - } - if (Files.exists(legacyFile)) { Files.move(legacyFile, proxiesFile); } + + if (Files.notExists(legacyFile)) { + Files.createFile(proxiesFile); + } } + Files.deleteIfExists(legacyFile); try (Stream lines = Files.lines(proxiesFile)) { return lines.map(String::trim) .map(UUID::fromString) diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java index 8cf7fcba..46c80b0f 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java @@ -85,7 +85,7 @@ public class EncryptionUtil { /** * Decrypts the content and extracts the key spec. * - * @param privateKey decryption cipher initialized with the private key + * @param cipher decryption cipher initialized with the private key * @param sharedKey the encrypted shared key * @return shared secret key * @throws GeneralSecurityException if it fails to decrypt the data diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/PluginMessageListener.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/PluginMessageListener.java index 0d1f1cc8..7e2d250f 100644 --- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/PluginMessageListener.java +++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/PluginMessageListener.java @@ -47,7 +47,7 @@ public class PluginMessageListener implements Listener { pluginMessageEvent.setCancelled(true); if (!(pluginMessageEvent.getSender() instanceof Server)) { - //check if the message is sent really from the server and not a malicious client + //check if the message is sent from the server return; } diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java index 3e57e150..46fc4f0b 100644 --- a/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java +++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java @@ -242,9 +242,7 @@ public class FastLoginCore

> { Path dataFolder = plugin.getPluginFolder(); try { - if (Files.notExists(dataFolder)) { - Files.createDirectories(dataFolder); - } + Files.createDirectories(dataFolder); Path configFile = dataFolder.resolve(fileName); if (Files.notExists(configFile)) {