Launcher/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java

36 lines
1 KiB
Java
Raw Normal View History

package pro.gravit.launchserver.auth;
2019-06-03 10:58:10 +03:00
import java.io.IOException;
import pro.gravit.launchserver.LaunchServer;
import pro.gravit.launchserver.auth.handler.AuthHandler;
import pro.gravit.launchserver.auth.provider.AuthProvider;
import pro.gravit.launchserver.auth.texture.TextureProvider;
public class AuthProviderPair {
2019-10-19 19:43:25 +03:00
public final AuthProvider provider;
public final AuthHandler handler;
public final TextureProvider textureProvider;
public final String name;
2019-04-13 20:55:01 +03:00
public String displayName;
2019-10-19 19:43:25 +03:00
public final boolean isDefault = true;
public AuthProviderPair(AuthProvider provider, AuthHandler handler, TextureProvider textureProvider, String name) {
this.provider = provider;
this.handler = handler;
this.textureProvider = textureProvider;
this.name = name;
}
public void init(LaunchServer srv) {
provider.init(srv);
handler.init(srv);
}
public void close() throws IOException {
provider.close();
handler.close();
textureProvider.close();
}
}