diff --git a/README.md b/README.md index 4c63ea75..fdb5a8f7 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi * /premium Label the invoker as paid account ###Permissions: -* fastlogin.command.premium +* fastlogin.bukkit.command.premium ###Requirements: * Plugin: [ProtocolLib](http://www.spigotmc.org/resources/protocollib.1997/) @@ -35,6 +35,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi * [xAuth](http://dev.bukkit.org/bukkit-plugins/xauth/) * [CrazyLogin](http://dev.bukkit.org/bukkit-plugins/crazylogin/) * [LoginSecurity](http://dev.bukkit.org/bukkit-plugins/loginsecurity/) + * [RoyalAuth](http://dev.bukkit.org/bukkit-plugins/royalauth/) ###Downloads diff --git a/bukkit/lib/LoginSecurity v2.0.10.jar b/bukkit/lib/LoginSecurity v2.0.10.jar deleted file mode 100644 index d394352f..00000000 Binary files a/bukkit/lib/LoginSecurity v2.0.10.jar and /dev/null differ diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 994c88ff..5d874072 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -39,6 +39,12 @@ luricos.de-repo http://repo.luricos.de/bukkit-plugins/ + + + + jitpack.io + https://jitpack.io + @@ -74,6 +80,18 @@ true + + com.github.lenis0012 + LoginSecurity-2 + -9c09e73b7f-1 + + + + com.github.RoyalDev + RoyalAuth + -e21354a9b7-1 + + de.luricos.bukkit xAuth @@ -110,15 +128,5 @@ system ${project.basedir}/lib/CrazyLogin v7.23.2.jar - - - - me.lenis0012.ls - LoginSecurity - 2.0.10 - true - system - ${project.basedir}/lib/LoginSecurity v2.0.10.jar - diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/RoyalAuthHook.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/RoyalAuthHook.java new file mode 100644 index 00000000..ace7a02e --- /dev/null +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/hooks/RoyalAuthHook.java @@ -0,0 +1,29 @@ +package com.github.games647.fastlogin.bukkit.hooks; + +import org.bukkit.entity.Player; +import org.royaldev.royalauth.AuthPlayer; +import org.royaldev.royalauth.Config; + +public class RoyalAuthHook implements AuthPlugin { + + @Override + public void forceLogin(Player player) { + AuthPlayer authPlayer = AuthPlayer.getAuthPlayer(player); + authPlayer.login(); + } + + @Override + public boolean isRegistered(String playerName) { + AuthPlayer authPlayer = AuthPlayer.getAuthPlayer(playerName); + return authPlayer.isRegistered(); + } + + @Override + public void forceRegister(Player player, String password) { + AuthPlayer authPlayer = AuthPlayer.getAuthPlayer(player); + authPlayer.setPassword(password, Config.passwordHashType); + + //login in the player after registration + forceLogin(player); + } +} diff --git a/bukkit/src/main/resources/plugin.yml b/bukkit/src/main/resources/plugin.yml index 8b8b736e..4f8f9d62 100644 --- a/bukkit/src/main/resources/plugin.yml +++ b/bukkit/src/main/resources/plugin.yml @@ -21,6 +21,7 @@ softdepend: - AuthMe - CrazyLogin - LoginSecurity + - RoyalAuth commands: ${project.parent.name}: