diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BukkitLoginSession.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BukkitLoginSession.java index f720194a..017e99bd 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BukkitLoginSession.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BukkitLoginSession.java @@ -36,7 +36,7 @@ import org.jetbrains.annotations.Nullable; /** * Represents a client connecting to the server. - * + *
* This session is invalid if the player disconnects or the login was successful */ public class BukkitLoginSession extends LoginSession { @@ -76,7 +76,7 @@ public class BukkitLoginSession extends LoginSession { /** * Gets the verify-token the server sent to the client. - * + *
* Empty if it's a BungeeCord connection * * @return verify token from the server diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/BungeeListener.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/BungeeListener.java index 9de359f0..868116ae 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/BungeeListener.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/BungeeListener.java @@ -45,7 +45,7 @@ import org.jetbrains.annotations.NotNull; /** * Responsible for receiving messages from a BungeeCord instance. - * + *
* This class also receives the plugin message from the bungeecord version of this plugin in order to get notified if
* the connection is in online mode.
*/
diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java
index c198552a..f963be3a 100644
--- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java
+++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java
@@ -223,7 +223,7 @@ public class ProtocolLibListener extends PacketAdapter {
plugin.removeSession(player.getAddress());
PacketContainer packet = packetEvent.getPacket();
- Optional
* Project page:
- *
+ *
* Spigot:
* ...
*/
diff --git a/core/src/main/java/com/github/games647/fastlogin/core/antibot/ProxyAgnosticMojangResolver.java b/core/src/main/java/com/github/games647/fastlogin/core/ProxyAgnosticMojangResolver.java
similarity index 98%
rename from core/src/main/java/com/github/games647/fastlogin/core/antibot/ProxyAgnosticMojangResolver.java
rename to core/src/main/java/com/github/games647/fastlogin/core/ProxyAgnosticMojangResolver.java
index 65def8de..41a3e379 100644
--- a/core/src/main/java/com/github/games647/fastlogin/core/antibot/ProxyAgnosticMojangResolver.java
+++ b/core/src/main/java/com/github/games647/fastlogin/core/ProxyAgnosticMojangResolver.java
@@ -23,7 +23,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-package com.github.games647.fastlogin.core.mojang;
+package com.github.games647.fastlogin.core;
import com.github.games647.craftapi.model.auth.Verification;
import com.github.games647.craftapi.resolver.MojangResolver;
diff --git a/core/src/main/java/com/github/games647/fastlogin/core/antibot/AntiBotService.java b/core/src/main/java/com/github/games647/fastlogin/core/antibot/AntiBotService.java
index 28483355..a1cc5d68 100644
--- a/core/src/main/java/com/github/games647/fastlogin/core/antibot/AntiBotService.java
+++ b/core/src/main/java/com/github/games647/fastlogin/core/antibot/AntiBotService.java
@@ -57,6 +57,6 @@ public class AntiBotService {
Block,
- Continue;
+ Continue
}
}
diff --git a/core/src/main/java/com/github/games647/fastlogin/core/hooks/AuthPlugin.java b/core/src/main/java/com/github/games647/fastlogin/core/hooks/AuthPlugin.java
index 7c6258ab..bec4d726 100644
--- a/core/src/main/java/com/github/games647/fastlogin/core/hooks/AuthPlugin.java
+++ b/core/src/main/java/com/github/games647/fastlogin/core/hooks/AuthPlugin.java
@@ -37,7 +37,7 @@ public interface AuthPlugin {
/**
* Login the premium (paid account) player after the player joined successfully the server.
- *
+ *
* This operation will be performed async while the player successfully
* joined the server.
*
@@ -48,17 +48,17 @@ public interface AuthPlugin {
/**
* Forces a register in order to protect the paid account.
- *
+ *
* This operation will be performed async while the player successfully
* joined the server.
- *
+ *
* After a successful registration the player should be logged
* in too.
- *
+ *
* The method will be called only for premium accounts.
* So it's recommended to set additionally premium property
* if possible.
- *
+ *
* Background: If we don't register an account, cracked players
* could steal the unregistered account from the paid
* player account
@@ -71,11 +71,11 @@ public interface AuthPlugin {
/**
* Checks whether an account exists for this player name.
- *
+ *
* This check should check if a cracked player account exists,
* so we can be sure the premium player doesn't steal the account
* of that player.
- *
+ *
* This operation will be performed async while the player is
* connecting.
*
diff --git a/core/src/main/java/com/github/games647/fastlogin/core/message/NamespaceKey.java b/core/src/main/java/com/github/games647/fastlogin/core/message/NamespaceKey.java
index a48ae992..a460620d 100644
--- a/core/src/main/java/com/github/games647/fastlogin/core/message/NamespaceKey.java
+++ b/core/src/main/java/com/github/games647/fastlogin/core/message/NamespaceKey.java
@@ -48,4 +48,12 @@ public class NamespaceKey {
public static String getCombined(String namespace, String key) {
return new NamespaceKey(namespace, key).combined;
}
+
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public String getKey() {
+ return key;
+ }
}
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 fc84381d..d232a037 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
@@ -28,6 +28,7 @@ package com.github.games647.fastlogin.core.shared;
import com.github.games647.craftapi.resolver.MojangResolver;
import com.github.games647.craftapi.resolver.http.RotatingProxySelector;
import com.github.games647.fastlogin.core.CommonUtil;
+import com.github.games647.fastlogin.core.ProxyAgnosticMojangResolver;
import com.github.games647.fastlogin.core.antibot.AntiBotService;
import com.github.games647.fastlogin.core.antibot.AntiBotService.Action;
import com.github.games647.fastlogin.core.antibot.RateLimiter;
@@ -35,7 +36,6 @@ import com.github.games647.fastlogin.core.antibot.TickingRateLimiter;
import com.github.games647.fastlogin.core.hooks.AuthPlugin;
import com.github.games647.fastlogin.core.hooks.DefaultPasswordGenerator;
import com.github.games647.fastlogin.core.hooks.PasswordGenerator;
-import com.github.games647.fastlogin.core.mojang.ProxyAgnosticMojangResolver;
import com.github.games647.fastlogin.core.storage.MySQLStorage;
import com.github.games647.fastlogin.core.storage.SQLStorage;
import com.github.games647.fastlogin.core.storage.SQLiteStorage;
diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/LoginSession.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/LoginSession.java
index a94cc87d..c4d35aa5 100644
--- a/core/src/main/java/com/github/games647/fastlogin/core/shared/LoginSession.java
+++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/LoginSession.java
@@ -91,10 +91,10 @@ public abstract class LoginSession {
@Override
public String toString() {
- return new StringJoiner(", ", LoginSession.class.getSimpleName() + "[", "]")
+ return new StringJoiner(", ", LoginSession.class.getSimpleName() + '[', "]")
.add("profile=" + profile)
- .add("requestUsername='" + requestUsername + "'")
- .add("username='" + username + "'")
+ .add("requestUsername='" + requestUsername + '\'')
+ .add("username='" + username + '\'')
.add("uuid=" + uuid)
.add("registered=" + registered)
.toString();
diff --git a/core/src/main/java/com/github/games647/fastlogin/core/storage/MySQLStorage.java b/core/src/main/java/com/github/games647/fastlogin/core/storage/MySQLStorage.java
index 13480f94..135046bf 100644
--- a/core/src/main/java/com/github/games647/fastlogin/core/storage/MySQLStorage.java
+++ b/core/src/main/java/com/github/games647/fastlogin/core/storage/MySQLStorage.java
@@ -85,7 +85,7 @@ public class MySQLStorage extends SQLStorage {
// default false - available in newer versions caches the statements server-side
config.addDataSourceProperty("useServerPrepStmts", true);
// default false - prefer use of local values for autocommit and
- // transaction isolation (alwaysSendSetIsolation) should only be enabled if always use the set* methods
+ // transaction isolation (alwaysSendSetIsolation) should only be enabled if we always use the set* methods
// instead of raw SQL
// https://forums.mysql.com/read.php?39,626495,626512
config.addDataSourceProperty("useLocalSessionState", true);
diff --git a/core/src/main/resources/config.yml b/core/src/main/resources/config.yml
index c99facbe..2c5405a3 100644
--- a/core/src/main/resources/config.yml
+++ b/core/src/main/resources/config.yml
@@ -281,7 +281,7 @@ database: '{pluginDir}/FastLogin.db'
# MySQL/MariaDB
# If you want to enable it, uncomment only the lines below; this not this line.
-# If on velocity use 'mariadb' as driver
+# If on velocity use 'mariadb' as the driver
#driver: 'mysql'
#host: '127.0.0.1'
#port: 3306
diff --git a/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java
index 17934c94..9cbf73b7 100644
--- a/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java
+++ b/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java
@@ -46,9 +46,9 @@ import com.velocitypowered.api.plugin.Plugin;
import com.velocitypowered.api.plugin.annotation.DataDirectory;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ProxyServer;
+import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
import com.velocitypowered.api.proxy.messages.ChannelRegistrar;
import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier;
-import com.velocitypowered.api.proxy.server.RegisteredServer;
import java.io.IOException;
import java.net.InetSocketAddress;
@@ -159,7 +159,7 @@ public class FastLoginVelocity implements PlatformPlugin