Revert converting auth hooks to the new format

-> backwards compatibility
This commit is contained in:
games647
2016-09-11 20:07:21 +02:00
parent 9f5f61f1c2
commit 2cd50d23ad
8 changed files with 8 additions and 15 deletions

View File

@ -1,7 +1,6 @@
package com.github.games647.fastlogin.bukkit.hooks;
import com.avaje.ebeaninternal.api.ClassUtil;
import com.github.games647.fastlogin.core.AuthPlugin;
import fr.xephi.authme.api.API;
import fr.xephi.authme.api.NewAPI;
@ -15,7 +14,7 @@ import org.bukkit.entity.Player;
* Bukkit: http://dev.bukkit.org/bukkit-plugins/authme-reloaded/
* Spigot: https://www.spigotmc.org/resources/authme-reloaded.6269/
*/
public class AuthMeHook implements AuthPlugin<Player> {
public class AuthMeHook implements BukkitAuthPlugin {
private final boolean isNewAPIAvailable;

View File

@ -1,6 +1,5 @@
package com.github.games647.fastlogin.bukkit.hooks;
import com.github.games647.fastlogin.core.AuthPlugin;
import de.st_ddt.crazylogin.CrazyLogin;
import de.st_ddt.crazylogin.data.LoginPlayerData;
@ -24,7 +23,7 @@ import org.bukkit.entity.Player;
*
* Bukkit: http://dev.bukkit.org/server-mods/crazylogin/
*/
public class CrazyLoginHook implements AuthPlugin<Player> {
public class CrazyLoginHook implements BukkitAuthPlugin {
protected final CrazyLogin crazyLoginPlugin = CrazyLogin.getPlugin();
private final PlayerListener playerListener = getListener();

View File

@ -1,6 +1,5 @@
package com.github.games647.fastlogin.bukkit.hooks;
import com.github.games647.fastlogin.core.AuthPlugin;
import io.github.lucaseasedup.logit.CancelledState;
import io.github.lucaseasedup.logit.LogItCore;
@ -15,7 +14,7 @@ import org.bukkit.entity.Player;
* Bukkit: Unknown
* Spigot: Unknown
*/
public class LogItHook implements AuthPlugin<Player> {
public class LogItHook implements BukkitAuthPlugin {
@Override
public boolean forceLogin(Player player) {

View File

@ -2,7 +2,6 @@ package com.github.games647.fastlogin.bukkit.hooks;
import com.avaje.ebeaninternal.api.ClassUtil;
import com.github.games647.fastlogin.bukkit.FastLoginBukkit;
import com.github.games647.fastlogin.core.AuthPlugin;
import com.google.common.base.Charsets;
import com.lenis0012.bukkit.loginsecurity.LoginSecurity;
import com.lenis0012.bukkit.loginsecurity.session.AuthService;
@ -27,7 +26,7 @@ import org.bukkit.entity.Player;
* Bukkit: http://dev.bukkit.org/bukkit-plugins/loginsecurity/
* Spigot: https://www.spigotmc.org/resources/loginsecurity.19362/
*/
public class LoginSecurityHook implements AuthPlugin<Player> {
public class LoginSecurityHook implements BukkitAuthPlugin {
protected final com.lenis0012.bukkit.ls.LoginSecurity securityPlugin;
protected final FastLoginBukkit plugin = (FastLoginBukkit) Bukkit.getPluginManager().getPlugin("FastLogin");

View File

@ -1,6 +1,5 @@
package com.github.games647.fastlogin.bukkit.hooks;
import com.github.games647.fastlogin.core.AuthPlugin;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
@ -20,7 +19,7 @@ import org.royaldev.royalauth.RoyalAuth;
*
* Bukkit: http://dev.bukkit.org/bukkit-plugins/royalauth/
*/
public class RoyalAuthHook implements AuthPlugin<Player> {
public class RoyalAuthHook implements BukkitAuthPlugin {
private final RoyalAuth royalAuthPlugin = (RoyalAuth) Bukkit.getPluginManager().getPlugin("RoyalAuth");

View File

@ -1,6 +1,5 @@
package com.github.games647.fastlogin.bukkit.hooks;
import com.github.games647.fastlogin.core.AuthPlugin;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
@ -21,7 +20,7 @@ import ultraauth.managers.PlayerManager;
* Bukkit: http://dev.bukkit.org/bukkit-plugins/ultraauth-aa/
* Spigot: https://www.spigotmc.org/resources/ultraauth.17044/
*/
public class UltraAuthHook implements AuthPlugin<Player> {
public class UltraAuthHook implements BukkitAuthPlugin {
protected final Plugin ultraAuthPlugin = Main.main;

View File

@ -1,6 +1,5 @@
package com.github.games647.fastlogin.bukkit.hooks;
import com.github.games647.fastlogin.core.AuthPlugin;
import de.luricos.bukkit.xAuth.xAuth;
import de.luricos.bukkit.xAuth.xAuthPlayer;
@ -21,7 +20,7 @@ import org.bukkit.entity.Player;
*
* Bukkit: http://dev.bukkit.org/bukkit-plugins/xauth/
*/
public class xAuthHook implements AuthPlugin<Player> {
public class xAuthHook implements BukkitAuthPlugin {
protected final xAuth xAuthPlugin = xAuth.getPlugin();

View File

@ -39,7 +39,7 @@ public interface AuthPlugin<T> {
* @param password a strong random generated password
* @return if the operation was successful
*/
boolean forceRegister(T player, String password) throws Exception;
boolean forceRegister(T player, String password);
/**
* Checks whether an account exists for this player name.