mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-29 18:27:36 +02:00
Remove deprecated API methods
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
######1.10
|
||||
|
||||
* Remove deprecated API methods from the last version
|
||||
|
||||
######1.9
|
||||
|
||||
* Added second attempt login -> cracked login
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.github.games647</groupId>
|
||||
<artifactId>fastlogin</artifactId>
|
||||
<version>1.9</version>
|
||||
<version>1.10</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -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;
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.github.games647</groupId>
|
||||
<artifactId>fastlogin</artifactId>
|
||||
<version>1.9</version>
|
||||
<version>1.10</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.github.games647.fastlogin.bungee;
|
||||
|
||||
import com.github.games647.fastlogin.bungee.hooks.BungeeAuthHook;
|
||||
import com.github.games647.fastlogin.bungee.hooks.BungeeAuthPlugin;
|
||||
import com.github.games647.fastlogin.bungee.listener.PlayerConnectionListener;
|
||||
import com.github.games647.fastlogin.bungee.listener.PluginMessageListener;
|
||||
import com.google.common.collect.Maps;
|
||||
@ -97,11 +96,6 @@ public class FastLoginBungee extends Plugin {
|
||||
return core;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setAuthPluginHook(BungeeAuthPlugin authPlugin) {
|
||||
core.setAuthPluginHook(authPlugin);
|
||||
}
|
||||
|
||||
public Configuration getConfig() {
|
||||
return config;
|
||||
}
|
||||
@ -110,16 +104,6 @@ public class FastLoginBungee extends Plugin {
|
||||
return session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the auth plugin hook for BungeeCord
|
||||
*
|
||||
* @return the auth hook for BungeeCord. null if none found
|
||||
*/
|
||||
@Deprecated
|
||||
public BungeeAuthPlugin getBungeeAuthPlugin() {
|
||||
return (BungeeAuthPlugin) core.getAuthPluginHook();
|
||||
}
|
||||
|
||||
private void registerHook() {
|
||||
Plugin plugin = getProxy().getPluginManager().getPlugin("BungeeAuth");
|
||||
if (plugin != null) {
|
||||
|
@ -1,20 +0,0 @@
|
||||
package com.github.games647.fastlogin.bungee.hooks;
|
||||
|
||||
import com.github.games647.fastlogin.core.hooks.AuthPlugin;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
|
||||
/**
|
||||
* @deprecated please use com.github.games647.fastlogin.core.hooks.AuthPlugin<net.md_5.bungee.api.connection.ProxiedPlayer>
|
||||
*/
|
||||
@Deprecated
|
||||
public interface BungeeAuthPlugin extends AuthPlugin<ProxiedPlayer> {
|
||||
|
||||
@Override
|
||||
boolean forceLogin(ProxiedPlayer player);
|
||||
|
||||
@Override
|
||||
boolean isRegistered(String playerName) throws Exception;
|
||||
|
||||
@Override
|
||||
boolean forceRegister(ProxiedPlayer player, String password);
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.github.games647</groupId>
|
||||
<artifactId>fastlogin</artifactId>
|
||||
<version>1.9</version>
|
||||
<version>1.10</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -28,7 +28,7 @@ public abstract class JoinManagement<T, S extends LoginSource> {
|
||||
String ip = source.getAddress().getAddress().getHostAddress();
|
||||
try {
|
||||
if (profile.getUserId() == -1) {
|
||||
if (core.getPendingLogins().containsKey(ip + username) && config.get("secondAttemptCracked", false)) {
|
||||
if (core.getPendingLogins().remove(ip + username) != null && config.get("secondAttemptCracked", false)) {
|
||||
core.getLogger().log(Level.INFO, "Second attempt login -> cracked {0}", username);
|
||||
|
||||
//first login request failed so make a cracked session
|
||||
|
2
pom.xml
2
pom.xml
@ -8,7 +8,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>FastLogin</name>
|
||||
<version>1.9</version>
|
||||
<version>1.10</version>
|
||||
<inceptionYear>2015</inceptionYear>
|
||||
<url>https://www.spigotmc.org/resources/fastlogin.14153/</url>
|
||||
<description>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.github.games647</groupId>
|
||||
<artifactId>fastlogin</artifactId>
|
||||
<version>1.9</version>
|
||||
<version>1.10</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
Reference in New Issue
Block a user