mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-31 19:24:47 +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
|
######1.9
|
||||||
|
|
||||||
* Added second attempt login -> cracked login
|
* Added second attempt login -> cracked login
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin</artifactId>
|
<artifactId>fastlogin</artifactId>
|
||||||
<version>1.9</version>
|
<version>1.10</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</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.CrackedCommand;
|
||||||
import com.github.games647.fastlogin.bukkit.commands.ImportCommand;
|
import com.github.games647.fastlogin.bukkit.commands.ImportCommand;
|
||||||
import com.github.games647.fastlogin.bukkit.commands.PremiumCommand;
|
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.BukkitJoinListener;
|
||||||
import com.github.games647.fastlogin.bukkit.listener.BungeeCordListener;
|
import com.github.games647.fastlogin.bukkit.listener.BungeeCordListener;
|
||||||
import com.github.games647.fastlogin.bukkit.listener.protocollib.EncryptionPacketListener;
|
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
|
* Gets a thread-safe map about players which are connecting to the server are being checked to be premium (paid
|
||||||
* account)
|
* account)
|
||||||
@@ -162,22 +156,6 @@ public class FastLoginBukkit extends JavaPlugin {
|
|||||||
return keyPair;
|
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() {
|
public boolean isBungeeCord() {
|
||||||
return bungeeCord;
|
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 com.google.common.io.ByteStreams;
|
||||||
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Future;
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@@ -120,11 +119,9 @@ public class ForceLoginTask implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isOnlineThreadSafe() {
|
private boolean isOnlineThreadSafe() {
|
||||||
//the playerlist isn't thread-safe
|
|
||||||
Future<Boolean> onlineFuture = Bukkit.getScheduler().callSyncMethod(plugin, player::isOnline);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return onlineFuture.get();
|
//the playerlist isn't thread-safe
|
||||||
|
return Bukkit.getScheduler().callSyncMethod(plugin, player::isOnline).get();
|
||||||
} catch (InterruptedException | ExecutionException ex) {
|
} catch (InterruptedException | ExecutionException ex) {
|
||||||
plugin.getLogger().log(Level.SEVERE, "Failed to perform thread-safe online check", ex);
|
plugin.getLogger().log(Level.SEVERE, "Failed to perform thread-safe online check", ex);
|
||||||
return false;
|
return false;
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin</artifactId>
|
<artifactId>fastlogin</artifactId>
|
||||||
<version>1.9</version>
|
<version>1.10</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
package com.github.games647.fastlogin.bungee;
|
package com.github.games647.fastlogin.bungee;
|
||||||
|
|
||||||
import com.github.games647.fastlogin.bungee.hooks.BungeeAuthHook;
|
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.PlayerConnectionListener;
|
||||||
import com.github.games647.fastlogin.bungee.listener.PluginMessageListener;
|
import com.github.games647.fastlogin.bungee.listener.PluginMessageListener;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
@@ -97,11 +96,6 @@ public class FastLoginBungee extends Plugin {
|
|||||||
return core;
|
return core;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void setAuthPluginHook(BungeeAuthPlugin authPlugin) {
|
|
||||||
core.setAuthPluginHook(authPlugin);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Configuration getConfig() {
|
public Configuration getConfig() {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
@@ -110,16 +104,6 @@ public class FastLoginBungee extends Plugin {
|
|||||||
return session;
|
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() {
|
private void registerHook() {
|
||||||
Plugin plugin = getProxy().getPluginManager().getPlugin("BungeeAuth");
|
Plugin plugin = getProxy().getPluginManager().getPlugin("BungeeAuth");
|
||||||
if (plugin != null) {
|
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>
|
<parent>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin</artifactId>
|
<artifactId>fastlogin</artifactId>
|
||||||
<version>1.9</version>
|
<version>1.10</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ public abstract class JoinManagement<T, S extends LoginSource> {
|
|||||||
String ip = source.getAddress().getAddress().getHostAddress();
|
String ip = source.getAddress().getAddress().getHostAddress();
|
||||||
try {
|
try {
|
||||||
if (profile.getUserId() == -1) {
|
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);
|
core.getLogger().log(Level.INFO, "Second attempt login -> cracked {0}", username);
|
||||||
|
|
||||||
//first login request failed so make a cracked session
|
//first login request failed so make a cracked session
|
||||||
|
2
pom.xml
2
pom.xml
@@ -8,7 +8,7 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>FastLogin</name>
|
<name>FastLogin</name>
|
||||||
<version>1.9</version>
|
<version>1.10</version>
|
||||||
<inceptionYear>2015</inceptionYear>
|
<inceptionYear>2015</inceptionYear>
|
||||||
<url>https://www.spigotmc.org/resources/fastlogin.14153/</url>
|
<url>https://www.spigotmc.org/resources/fastlogin.14153/</url>
|
||||||
<description>
|
<description>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin</artifactId>
|
<artifactId>fastlogin</artifactId>
|
||||||
<version>1.9</version>
|
<version>1.10</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user