Remove deprecated API methods

This commit is contained in:
games647
2016-09-21 13:22:48 +02:00
parent 87ca00d75d
commit 1acc825f81
13 changed files with 12 additions and 104 deletions
@@ -6,7 +6,6 @@ import com.comphenix.protocol.ProtocolLibrary;
import com.github.games647.fastlogin.bukkit.commands.CrackedCommand;
import com.github.games647.fastlogin.bukkit.commands.ImportCommand;
import com.github.games647.fastlogin.bukkit.commands.PremiumCommand;
import com.github.games647.fastlogin.bukkit.hooks.BukkitAuthPlugin;
import com.github.games647.fastlogin.bukkit.listener.BukkitJoinListener;
import com.github.games647.fastlogin.bukkit.listener.BungeeCordListener;
import com.github.games647.fastlogin.bukkit.listener.protocollib.EncryptionPacketListener;
@@ -138,11 +137,6 @@ public class FastLoginBukkit extends JavaPlugin {
}
}
@Deprecated
public void setPasswordGenerator(PasswordGenerator passwordGenerator) {
core.setPasswordGenerator(passwordGenerator);
}
/**
* Gets a thread-safe map about players which are connecting to the server are being checked to be premium (paid
* account)
@@ -162,22 +156,6 @@ public class FastLoginBukkit extends JavaPlugin {
return keyPair;
}
/**
* Gets the auth plugin hook in order to interact with the plugins. This can be null if no supporting auth plugin
* was found.
*
* @return interface to any supported auth plugin
*/
@Deprecated
public BukkitAuthPlugin getAuthPlugin() {
return (BukkitAuthPlugin) core.getAuthPluginHook();
}
@Deprecated
public void setAuthPluginHook(BukkitAuthPlugin authPlugin) {
core.setAuthPluginHook(authPlugin);
}
public boolean isBungeeCord() {
return bungeeCord;
}
@@ -1,14 +0,0 @@
package com.github.games647.fastlogin.bukkit;
import org.bukkit.entity.Player;
/**
*
* @deprecated please use com.github.games647.fastlogin.core.hooks.PasswordGenerator<org.bukkit.entity.Player>
*/
@Deprecated
public interface PasswordGenerator extends com.github.games647.fastlogin.core.hooks.PasswordGenerator<Player> {
@Override
String getRandomPassword(Player player);
}
@@ -1,21 +0,0 @@
package com.github.games647.fastlogin.bukkit.hooks;
import com.github.games647.fastlogin.core.hooks.AuthPlugin;
import org.bukkit.entity.Player;
/**
* @deprecated please use com.github.games647.fastlogin.core.hooks.AuthPlugin<org.bukkit.entity.Player>
*/
@Deprecated
public interface BukkitAuthPlugin extends AuthPlugin<Player> {
@Override
boolean forceLogin(Player player);
@Override
boolean isRegistered(String playerName) throws Exception;
@Override
boolean forceRegister(Player player, String password);
}
@@ -9,7 +9,6 @@ import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.logging.Level;
import org.bukkit.Bukkit;
@@ -120,11 +119,9 @@ public class ForceLoginTask implements Runnable {
}
private boolean isOnlineThreadSafe() {
//the playerlist isn't thread-safe
Future<Boolean> onlineFuture = Bukkit.getScheduler().callSyncMethod(plugin, player::isOnline);
try {
return onlineFuture.get();
//the playerlist isn't thread-safe
return Bukkit.getScheduler().callSyncMethod(plugin, player::isOnline).get();
} catch (InterruptedException | ExecutionException ex) {
plugin.getLogger().log(Level.SEVERE, "Failed to perform thread-safe online check", ex);
return false;