mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-10 17:49:40 +03:00
35 lines
990 B
Java
35 lines
990 B
Java
package pro.gravit.launchserver.components;
|
|
|
|
import pro.gravit.launchserver.LaunchServer;
|
|
import pro.gravit.utils.ProviderMap;
|
|
|
|
public abstract class Component {
|
|
public static final ProviderMap<Component> providers = new ProviderMap<>();
|
|
private static boolean registredComp = false;
|
|
protected String componentName;
|
|
|
|
public static void registerComponents() {
|
|
if (!registredComp) {
|
|
providers.register("authLimiter", AuthLimiterComponent.class);
|
|
providers.register("regLimiter", RegLimiterComponent.class);
|
|
providers.register("commandRemover", CommandRemoverComponent.class);
|
|
registredComp = true;
|
|
}
|
|
}
|
|
|
|
@Deprecated
|
|
public void preInit(LaunchServer launchServer) {
|
|
|
|
}
|
|
|
|
public abstract void init(LaunchServer launchServer);
|
|
|
|
public final void setComponentName(String s) {
|
|
this.componentName = s;
|
|
}
|
|
|
|
@Deprecated
|
|
public void postInit(LaunchServer launchServer) {
|
|
|
|
}
|
|
}
|