Remove the nasty UltraAuth fakeplayer workaround
This commit is contained in:
1 parent
ca42a7c19e
commit
a02acd2d63
13 files changed
+13
-1492
No files matched your search
@@ -25,7 +25,7 @@ import org.bukkit.entity.Player;
|
||||
*/
|
||||
public class CrazyLoginHook implements AuthPlugin<Player> {
|
||||
|
||||
protected final CrazyLogin crazyLoginPlugin = CrazyLogin.getPlugin();
|
||||
private final CrazyLogin crazyLoginPlugin = CrazyLogin.getPlugin();
|
||||
private final PlayerListener playerListener = getListener();
|
||||
|
||||
@Override
|
||||
@@ -83,7 +83,7 @@ public class CrazyLoginHook implements AuthPlugin<Player> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean forceRegister(final Player player, String password) {
|
||||
public boolean forceRegister(Player player, String password) {
|
||||
CrazyLoginDataDatabase crazyDatabase = crazyLoginPlugin.getCrazyDatabase();
|
||||
|
||||
//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> {
|
||||
|
||||
protected final Plugin ultraAuthPlugin = Main.main;
|
||||
private final Plugin ultraAuthPlugin = Main.main;
|
||||
|
||||
@Override
|
||||
public boolean forceLogin(final Player player) {
|
||||
public boolean forceLogin(Player player) {
|
||||
//not thread-safe
|
||||
Future<Boolean> future = Bukkit.getScheduler().callSyncMethod(ultraAuthPlugin, () -> {
|
||||
UltraAuthAPI.authenticatedPlayer(player);
|
||||
@@ -42,7 +42,7 @@ public class UltraAuthHook implements AuthPlugin<Player> {
|
||||
|
||||
@Override
|
||||
public boolean isRegistered(String playerName) throws Exception {
|
||||
return UltraAuthAPI.isRegisterd(new FakePlayer(playerName));
|
||||
return UltraAuthAPI.isRegisterd(playerName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.bukkit.entity.Player;
|
||||
*/
|
||||
public class xAuthHook implements AuthPlugin<Player> {
|
||||
|
||||
protected final xAuth xAuthPlugin = xAuth.getPlugin();
|
||||
private final xAuth xAuthPlugin = xAuth.getPlugin();
|
||||
|
||||
@Override
|
||||
public boolean forceLogin(Player player) {
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class BungeeCordListener implements PluginMessageListener {
|
||||
|
||||
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
|
||||
private final Set<UUID> proxyIds;
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import protocolsupport.api.events.PlayerPropertiesResolveEvent;
|
||||
|
||||
public class ProtocolSupportListener extends JoinManagement<Player, ProtocolLoginSource> implements Listener {
|
||||
|
||||
protected final FastLoginBukkit plugin;
|
||||
private final FastLoginBukkit plugin;
|
||||
|
||||
public ProtocolSupportListener(FastLoginBukkit plugin) {
|
||||
super(plugin.getCore(), plugin.getCore().getAuthPluginHook());
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.bukkit.entity.Player;
|
||||
public class ForceLoginTask implements Runnable {
|
||||
|
||||
private final FastLoginBukkit plugin;
|
||||
protected final Player player;
|
||||
private final Player player;
|
||||
|
||||
public ForceLoginTask(FastLoginBukkit plugin, Player player) {
|
||||
this.plugin = plugin;
|
||||
|
||||
Reference in new issue
Block a user