diff --git a/README.md b/README.md index 7ec83167..bee46eeb 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ Possible values: `Premium`, `Cracked`, `Unknown` * [CrazyLogin](https://dev.bukkit.org/bukkit-plugins/crazylogin/) * [LoginSecurity](https://dev.bukkit.org/bukkit-plugins/loginsecurity/) * [UltraAuth](https://dev.bukkit.org/bukkit-plugins/ultraauth-aa/) -* [SodionAuth](https://github.com/Mohist-Community/SodionAuth) +* [SodionAuth (2.0+)](https://github.com/Mohist-Community/SodionAuth) ### BungeeCord/Waterfall diff --git a/bukkit/lib/SodionAuth-Bukkit-2.0-API-only.jar b/bukkit/lib/SodionAuth-Bukkit-2.0-API-only.jar deleted file mode 100644 index 50641972..00000000 Binary files a/bukkit/lib/SodionAuth-Bukkit-2.0-API-only.jar and /dev/null differ diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 12980349..60375f33 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -235,12 +235,11 @@ - red.mohist.sodionauth - SodionAuth-Bukkit - 2.0-SNAPSHOT + com.github.Mohist-Community + SodionAuth + e3395df27a true - system - ${project.basedir}/lib/SodionAuth-Bukkit-2.0-API-only.jar + provided diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hook/SodionAuthHook.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hook/SodionAuthHook.java index 85b84417..2c7d2d67 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hook/SodionAuthHook.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hook/SodionAuthHook.java @@ -37,13 +37,17 @@ public class SodionAuthHook implements AuthPlugin { @Override public boolean forceRegister(Player player, String password) { - plugin.getLog().warn("AutoRegister is not implemented by SodionAuth yet."); - plugin.getLog().warn("Disable it to prevent further issue!"); - return false; + try{ + return SodionAuthApi.register(new BukkitPlayer(player), password); + } catch (UnsupportedOperationException e){ + plugin.getLog().warn("Currently SodionAuth is not accepting forceRegister, " + + "It may be caused by unsupported AuthBackend"); + return false; + } } @Override public boolean isRegistered(String playerName) { - return SodionAuthApi.isRegister(playerName); + return SodionAuthApi.isRegistered(playerName); } }