diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/CrazyLoginHook.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/CrazyLoginHook.java index 3f9ec69d..71938f87 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/CrazyLoginHook.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/CrazyLoginHook.java @@ -19,7 +19,7 @@ import org.bukkit.Bukkit; import org.bukkit.entity.Player; /** - * Github: https://github.com/ST-DDT/CrazyLogin + * GitHub: https://github.com/ST-DDT/CrazyLogin *
* Project page: *
diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/LogItHook.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/LogItHook.java index 3605948b..b8fc6230 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/LogItHook.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/LogItHook.java @@ -12,7 +12,7 @@ import java.time.Instant; import org.bukkit.entity.Player; /** - * Github: https://github.com/XziomekX/LogIt + * GitHub: https://github.com/XziomekX/LogIt *
* Project page: *
diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/LoginSecurityHook.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/LoginSecurityHook.java index 53eabab7..fb51158e 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/LoginSecurityHook.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/LoginSecurityHook.java @@ -11,7 +11,9 @@ import com.lenis0012.bukkit.loginsecurity.session.action.RegisterAction; import org.bukkit.entity.Player; /** - * Github: https://github.com/lenis0012/LoginSecurity-2 Project page: + * GitHub: https://github.com/lenis0012/LoginSecurity-2 + *
+ * Project page: *
* Bukkit: https://dev.bukkit.org/bukkit-plugins/loginsecurity/ *
diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/xAuthHook.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/xAuthHook.java index c18839e9..f2febb00 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/xAuthHook.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/xAuthHook.java @@ -14,7 +14,7 @@ import org.bukkit.Bukkit; import org.bukkit.entity.Player; /** - * Github: https://github.com/LycanDevelopment/xAuth/ + * GitHub: https://github.com/LycanDevelopment/xAuth/ *
* Project page: *
diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/NameCheckTask.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/NameCheckTask.java
index a21e7f80..714b31f6 100644
--- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/NameCheckTask.java
+++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/NameCheckTask.java
@@ -43,7 +43,7 @@ public class NameCheckTask extends JoinManagement > {
defaults = configProvider.load(defaultStream);
}
- File file = plugin.getPluginFolder().resolve(fileName).toFile();
- return configProvider.load(file, defaults);
+ Path file = plugin.getPluginFolder().resolve(fileName);
+ return configProvider.load(Files.newBufferedReader(file), defaults);
}
public MojangApiConnector getApiConnector() {
@@ -121,6 +122,10 @@ public class FastLoginCore > {
public boolean setupDatabase() {
String driver = config.getString("driver");
+ if (!checkDriver(driver)) {
+ return false;
+ }
+
String host = config.get("host", "");
int port = config.get("port", 3306);
String database = config.getString("database");
@@ -140,6 +145,20 @@ public class FastLoginCore > {
}
}
+ private boolean checkDriver(String className) {
+ try {
+ Class.forName(className);
+ return true;
+ } catch (ClassNotFoundException notFoundEx) {
+ Logger log = plugin.getLog();
+ log.warn("This driver {} is not supported on this platform", className);
+ log.warn("Please choose MySQL (Spigot+BungeeCord), SQLite (Spigot+Sponge) or MariaDB (Sponge)", notFoundEx);
+ }
+
+ return false;
+ }
+
+
public Configuration getConfig() {
return config;
}
diff --git a/core/src/main/resources/config.yml b/core/src/main/resources/config.yml
index e62cbc19..938ef7d5 100644
--- a/core/src/main/resources/config.yml
+++ b/core/src/main/resources/config.yml
@@ -82,7 +82,7 @@ premiumUuid: false
#
# nameChangeCheck = false ----- autoRegister = true
#
-# We will always request a premium authentication if the username is unknown to us, but is in use by a paid minecraft
+# We will always request a premium authentication if the username is unknown to us, but is in use by a paid Minecraft
# account. This means it's kind of a more aggressive check like nameChangeCheck = true and autoRegister = false, because
# it request a premium authentication which are completely new to us, that even the premium UUID is not in our database.
#
@@ -95,7 +95,7 @@ premiumUuid: false
# Based on autoRegister it checks if the player name is premium and login using a premium authentication. After that
# fastlogin receives the premium UUID and can update the database record.
#
-# **Limitation from autoRegister**: New offline players who uses the username of an existing minecraft cannot join the
+# **Limitation from autoRegister**: New offline players who uses the username of an existing Minecraft cannot join the
# server.
nameChangeCheck: false
@@ -138,7 +138,7 @@ premium-warning: true
ip-addresses: []
# How many requests should be established to the Mojang API for Name -> UUID requests. Some other plugins as well
-# as the head minecraft block make such requests as well. Using this option you can limit the amount requests this
+# as the head Minecraft block make such requests as well. Using this option you can limit the amount requests this
# plugin should make.
#
# If you lower this value, other plugins could still make requests while FastLogin cannot.
@@ -154,7 +154,7 @@ auto-register-unknown: false
# the player won't be auto logged into the account.
#
# This can be used as 2Factor authentication for better security of your accounts. A hacker then needs both passwords.
-# The password of your minecraft and the password to login in with your auth plugin
+# The password of your Minecraft and the password to login in with your auth plugin
autoLogin: true
# Database configuration
diff --git a/core/src/main/resources/messages.yml b/core/src/main/resources/messages.yml
index ba4b95df..00122be7 100644
--- a/core/src/main/resources/messages.yml
+++ b/core/src/main/resources/messages.yml
@@ -5,7 +5,7 @@
# You can access the newest locale here:
# https://github.com/games647/FastLogin/blob/master/core/src/main/resources/messages.yml
#
-# You want to have language template? Visit the Github Wiki here:
+# You want to have language template? Visit the GitHub Wiki here:
# https://github.com/games647/FastLogin/wiki/English
# In order to split a message into separate lines you could just make a new line, but keep the '
@@ -22,7 +22,7 @@
# ========= Shared (BungeeCord and Bukkit) ============
# Switch mode is activated and a new (non-whitelist) cracked player tries to join
-switch-kick-message: '&4Only paid minecraft whitelisted accounts are allowed to join this server'
+switch-kick-message: '&4Only paid Minecraft whitelisted accounts are allowed to join this server'
# GameProfile activated premium login in order to skip offline authentication
add-premium: '&2Added to the list of premium players'
@@ -90,7 +90,7 @@ invalid-requst: '&4Invalid request'
not-started: '&cServer is not fully started yet. Please retry'
# Warning message if a user invoked /premium command
-premium-warning: '&c&lWARNING: &6This command should &lonly&6 be invoked if you are the owner of this paid minecraft account
+premium-warning: '&c&lWARNING: &6This command should &lonly&6 be invoked if you are the owner of this paid Minecraft account
Type &a/premium&6 again to confirm'
# ========= Bungee/Waterfall only ================================