File tree Expand file tree Collapse file tree
src/main/java/es/superstrellaa/storagemanager Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package es .superstrellaa .storagemanager ;
22
3- import es .superstrellaa .storagemanager .internal .lifecycle .ServerBootstrap ;
3+ import es .superstrellaa .storagemanager .internal .bootstrap .ServerBootstrap ;
44import net .fabricmc .api .EnvType ;
55import net .fabricmc .api .ModInitializer ;
66import net .fabricmc .loader .api .FabricLoader ;
Original file line number Diff line number Diff line change 1+ package es .superstrellaa .storagemanager .internal .bootstrap ;
2+
3+ import es .superstrellaa .storagemanager .StorageManagerAPI ;
4+ import es .superstrellaa .storagemanager .internal .SQLiteBackend ;
5+ import es .superstrellaa .storagemanager .internal .cache .WriteCache ;
6+ import es .superstrellaa .storagemanager .internal .lifecycle .ShutdownHook ;
7+ import es .superstrellaa .storagemanager .internal .middleware .ServerGuard ;
8+
9+ public final class ServerBootstrap {
10+
11+ private static boolean initialized = false ;
12+
13+ public static void register () {
14+ if (initialized ) return ;
15+
16+ SQLiteBackend .init ();
17+ WriteCache .getInstance ().start ();
18+ ShutdownHook .register ();
19+
20+ ServerGuard .markServerReady ();
21+
22+ initialized = true ;
23+ StorageManagerAPI .LOGGER .info ("StorageManager API initialized (server-side)" );
24+ }
25+
26+ private ServerBootstrap () {}
27+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments