Add royal auth support + Move maven system repositories to jiitpack

This commit is contained in:
games647 committed 2016-02-07 14:39:59 +01:00
1 parent 353cd17823
commit b2ae46a90a
5 files changed
+50 -11

No files matched your search

@@ -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);
}
}
+1
View File
@@ -21,6 +21,7 @@ softdepend:
- AuthMe
- CrazyLogin
- LoginSecurity
- RoyalAuth
commands:
${project.parent.name}: