mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 02:37:34 +02:00
Remove the nasty UltraAuth fakeplayer workaround
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
######1.9
|
######1.9
|
||||||
|
|
||||||
|
* Remove the nasty UltraAuth fakeplayer workaround by using a new api method. You should UltraAuth if you have it
|
||||||
* Upgrade to Java 8
|
* Upgrade to Java 8
|
||||||
* Drop support for LoginSecurity 1.X since 2.X seems to be stable
|
* Drop support for LoginSecurity 1.X since 2.X seems to be stable
|
||||||
* Refactored/Cleaned up a lot of code
|
* Refactored/Cleaned up a lot of code
|
||||||
|
Binary file not shown.
BIN
bukkit/lib/UltraAuth v2.1.2.jar
Normal file
BIN
bukkit/lib/UltraAuth v2.1.2.jar
Normal file
Binary file not shown.
@ -176,7 +176,7 @@
|
|||||||
<version>2.0.2</version>
|
<version>2.0.2</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/lib/UltraAuth v2.0.2.jar</systemPath>
|
<systemPath>${project.basedir}/lib/UltraAuth v2.1.2.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@ -25,7 +25,7 @@ import org.bukkit.entity.Player;
|
|||||||
*/
|
*/
|
||||||
public class CrazyLoginHook implements AuthPlugin<Player> {
|
public class CrazyLoginHook implements AuthPlugin<Player> {
|
||||||
|
|
||||||
protected final CrazyLogin crazyLoginPlugin = CrazyLogin.getPlugin();
|
private final CrazyLogin crazyLoginPlugin = CrazyLogin.getPlugin();
|
||||||
private final PlayerListener playerListener = getListener();
|
private final PlayerListener playerListener = getListener();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -83,7 +83,7 @@ public class CrazyLoginHook implements AuthPlugin<Player> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean forceRegister(final Player player, String password) {
|
public boolean forceRegister(Player player, String password) {
|
||||||
CrazyLoginDataDatabase crazyDatabase = crazyLoginPlugin.getCrazyDatabase();
|
CrazyLoginDataDatabase crazyDatabase = crazyLoginPlugin.getCrazyDatabase();
|
||||||
|
|
||||||
//this executes a sql query and accesses only thread safe collections so we can run it async
|
//this executes a sql query and accesses only thread safe collections so we can run it async
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -22,10 +22,10 @@ import ultraauth.managers.PlayerManager;
|
|||||||
*/
|
*/
|
||||||
public class UltraAuthHook implements AuthPlugin<Player> {
|
public class UltraAuthHook implements AuthPlugin<Player> {
|
||||||
|
|
||||||
protected final Plugin ultraAuthPlugin = Main.main;
|
private final Plugin ultraAuthPlugin = Main.main;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean forceLogin(final Player player) {
|
public boolean forceLogin(Player player) {
|
||||||
//not thread-safe
|
//not thread-safe
|
||||||
Future<Boolean> future = Bukkit.getScheduler().callSyncMethod(ultraAuthPlugin, () -> {
|
Future<Boolean> future = Bukkit.getScheduler().callSyncMethod(ultraAuthPlugin, () -> {
|
||||||
UltraAuthAPI.authenticatedPlayer(player);
|
UltraAuthAPI.authenticatedPlayer(player);
|
||||||
@ -42,7 +42,7 @@ public class UltraAuthHook implements AuthPlugin<Player> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRegistered(String playerName) throws Exception {
|
public boolean isRegistered(String playerName) throws Exception {
|
||||||
return UltraAuthAPI.isRegisterd(new FakePlayer(playerName));
|
return UltraAuthAPI.isRegisterd(playerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -22,7 +22,7 @@ import org.bukkit.entity.Player;
|
|||||||
*/
|
*/
|
||||||
public class xAuthHook implements AuthPlugin<Player> {
|
public class xAuthHook implements AuthPlugin<Player> {
|
||||||
|
|
||||||
protected final xAuth xAuthPlugin = xAuth.getPlugin();
|
private final xAuth xAuthPlugin = xAuth.getPlugin();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean forceLogin(Player player) {
|
public boolean forceLogin(Player player) {
|
||||||
|
@ -32,7 +32,7 @@ public class BungeeCordListener implements PluginMessageListener {
|
|||||||
|
|
||||||
private static final String FILE_NAME = "proxy-whitelist.txt";
|
private static final String FILE_NAME = "proxy-whitelist.txt";
|
||||||
|
|
||||||
protected final FastLoginBukkit plugin;
|
private final FastLoginBukkit plugin;
|
||||||
//null if whitelist is empty so bungeecord support is disabled
|
//null if whitelist is empty so bungeecord support is disabled
|
||||||
private final Set<UUID> proxyIds;
|
private final Set<UUID> proxyIds;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ import protocolsupport.api.events.PlayerPropertiesResolveEvent;
|
|||||||
|
|
||||||
public class ProtocolSupportListener extends JoinManagement<Player, ProtocolLoginSource> implements Listener {
|
public class ProtocolSupportListener extends JoinManagement<Player, ProtocolLoginSource> implements Listener {
|
||||||
|
|
||||||
protected final FastLoginBukkit plugin;
|
private final FastLoginBukkit plugin;
|
||||||
|
|
||||||
public ProtocolSupportListener(FastLoginBukkit plugin) {
|
public ProtocolSupportListener(FastLoginBukkit plugin) {
|
||||||
super(plugin.getCore(), plugin.getCore().getAuthPluginHook());
|
super(plugin.getCore(), plugin.getCore().getAuthPluginHook());
|
||||||
|
@ -18,7 +18,7 @@ import org.bukkit.entity.Player;
|
|||||||
public class ForceLoginTask implements Runnable {
|
public class ForceLoginTask implements Runnable {
|
||||||
|
|
||||||
private final FastLoginBukkit plugin;
|
private final FastLoginBukkit plugin;
|
||||||
protected final Player player;
|
private final Player player;
|
||||||
|
|
||||||
public ForceLoginTask(FastLoginBukkit plugin, Player player) {
|
public ForceLoginTask(FastLoginBukkit plugin, Player player) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
@ -32,7 +32,7 @@ import net.md_5.bungee.event.EventPriority;
|
|||||||
*/
|
*/
|
||||||
public class PlayerConnectionListener implements Listener {
|
public class PlayerConnectionListener implements Listener {
|
||||||
|
|
||||||
protected final FastLoginBungee plugin;
|
private final FastLoginBungee plugin;
|
||||||
|
|
||||||
public PlayerConnectionListener(FastLoginBungee plugin) {
|
public PlayerConnectionListener(FastLoginBungee plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
@ -19,7 +19,7 @@ import net.md_5.bungee.event.EventHandler;
|
|||||||
|
|
||||||
public class PluginMessageListener implements Listener {
|
public class PluginMessageListener implements Listener {
|
||||||
|
|
||||||
protected final FastLoginBungee plugin;
|
private final FastLoginBungee plugin;
|
||||||
|
|
||||||
public PluginMessageListener(FastLoginBungee plugin) {
|
public PluginMessageListener(FastLoginBungee plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
Reference in New Issue
Block a user