38 lines
1.0 KiB
Java
38 lines
1.0 KiB
Java
package dev.projectcapture.hytale;
|
|
|
|
import com.hypixel.hytale.server.core.plugin.JavaPlugin;
|
|
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
|
|
import dev.projectcapture.hytale.persistence.JsonStateStore;
|
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
|
/**
|
|
* Thin Hytale entry point. Domain behavior lives in {@code engine}; this class
|
|
* owns only Hytale lifecycle and adapter wiring.
|
|
*/
|
|
public final class ProjectCapturePlugin extends JavaPlugin {
|
|
private final JsonStateStore stateStore;
|
|
private final FeatureFlags featureFlags;
|
|
|
|
public ProjectCapturePlugin(JavaPluginInit init) {
|
|
super(init);
|
|
this.stateStore = new JsonStateStore(init.getDataDirectory());
|
|
this.featureFlags = FeatureFlags.stableRelease();
|
|
}
|
|
|
|
@Override
|
|
public CompletableFuture<Void> preLoad() {
|
|
stateStore.initialize();
|
|
return CompletableFuture.completedFuture(null);
|
|
}
|
|
|
|
JsonStateStore stateStore() {
|
|
return stateStore;
|
|
}
|
|
|
|
FeatureFlags featureFlags() {
|
|
return featureFlags;
|
|
}
|
|
}
|
|
|