Launcher/LaunchServer/src/main/java/ru/gravit/launchserver/components/Component.java

24 lines
752 B
Java
Raw Normal View History

2019-03-13 12:13:21 +03:00
package ru.gravit.launchserver.components;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.utils.ProviderMap;
2019-03-13 12:13:21 +03:00
public abstract class Component {
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) {
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
public abstract void preInit(LaunchServer launchServer);
2019-04-03 16:27:40 +03:00
public abstract void init(LaunchServer launchServer);
2019-04-03 16:27:40 +03:00
public abstract void postInit(LaunchServer launchServer);
2019-03-13 12:13:21 +03:00
}