2019-03-13 12:13:21 +03:00
|
|
|
package ru.gravit.launchserver.components;
|
|
|
|
|
2019-03-13 12:24:28 +03:00
|
|
|
import ru.gravit.launchserver.LaunchServer;
|
2019-04-20 00:29:05 +03:00
|
|
|
import ru.gravit.utils.ProviderMap;
|
2019-03-13 12:13:21 +03:00
|
|
|
|
2019-03-13 12:24:28 +03:00
|
|
|
public abstract class Component {
|
2019-04-20 00:29:05 +03:00
|
|
|
public static ProviderMap<Component> providers = new ProviderMap<>();
|
2019-03-13 12:13:21 +03:00
|
|
|
private static boolean registredComp = false;
|
|
|
|
|
|
|
|
public static void registerComponents() {
|
|
|
|
if (!registredComp) {
|
2019-04-27 13:05:49 +03:00
|
|
|
providers.register("authLimiter", AuthLimiterComponent.class);
|
|
|
|
providers.register("commandRemover", CommandRemoverComponent.class);
|
2019-03-13 12:13:21 +03:00
|
|
|
registredComp = true;
|
|
|
|
}
|
|
|
|
}
|
2019-04-03 16:27:40 +03:00
|
|
|
|
2019-03-13 12:24:28 +03:00
|
|
|
public abstract void preInit(LaunchServer launchServer);
|
2019-04-03 16:27:40 +03:00
|
|
|
|
2019-03-13 12:24:28 +03:00
|
|
|
public abstract void init(LaunchServer launchServer);
|
2019-04-03 16:27:40 +03:00
|
|
|
|
2019-03-13 12:24:28 +03:00
|
|
|
public abstract void postInit(LaunchServer launchServer);
|
2019-03-13 12:13:21 +03:00
|
|
|
}
|