diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java index 7b0f86ec..a833c872 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java @@ -5,7 +5,13 @@ import pro.gravit.launcher.LauncherNetworkAPI; import pro.gravit.launcher.request.WebSocketEvent; +/** + * The class of all request events sent by the server to the client + */ public abstract class RequestEvent implements WebSocketEvent { + /** + * UUID sent in request + */ @LauncherNetworkAPI public UUID requestUUID; } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java index 51c8b784..c6c15472 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java @@ -28,16 +28,28 @@ public LauncherModuleInfo getModuleInfo() { /** * Module initialization status at the current time - * CREATED - Module status immediately after loading - * INIT - The state of the module during the execution of the method init() - * FINISH - Status of the module after initialization */ public enum InitStatus { + /** + * When creating an object + */ CREATED(false), + /** + * After setting the context + */ PRE_INIT_WAIT(true), + /** + * During the pre-initialization phase + */ PRE_INIT(false), + /** + * Awaiting initialization phase + */ INIT_WAIT(true), + /** + * During the initialization phase + */ INIT(false), FINISH(true); @@ -96,13 +108,13 @@ public void setContext(LauncherModulesContext context) /** * This method is called before initializing all modules and resolving dependencies. * You can: - * Use to Module Manager - * Add custom modules not described in the manifest - * Change information about your module or modules you control + * - Use to Module Manager + * - Add custom modules not described in the manifest + * - Change information about your module or modules you control * You can not: - * Use your dependencies - * Use API Launcher, LaunchServer, ServerWrapper - * Change the names of any modules + * - Use your dependencies + * - Use Launcher, LaunchServer, ServerWrapper API + * - Change the names of any modules */ public void preInitAction() { //NOP @@ -119,14 +131,14 @@ public LauncherModule preInit() /** * Basic module initialization method * You can: - * Subscribe to events - * Use your dependencies - * Use provided initContext - * Receive modules and access the module’s internal methods + * - Subscribe to events + * - Use your dependencies + * - Use provided initContext + * - Receive modules and access the module’s internal methods * You can not: - * Modify module description, dependencies - * Add modules - * Read configuration + * - Modify module description, dependencies + * - Add modules + * - Read configuration * @param initContext null on module initialization during boot or startup * Not null during module initialization while running */ diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModuleInfo.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModuleInfo.java index a9950d72..996618a5 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModuleInfo.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModuleInfo.java @@ -7,6 +7,9 @@ public class LauncherModuleInfo { public final Version version; public final int priority; public final String[] dependencies; + /** + * Alternative module names + */ public final String[] providers; public LauncherModuleInfo(String name, Version version) { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/WebSocketEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/WebSocketEvent.java index 03895907..59d259d4 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/WebSocketEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/WebSocketEvent.java @@ -2,6 +2,9 @@ import pro.gravit.utils.TypeSerializeInterface; +/** + * The interface of all events sent by the server to the client + */ public interface WebSocketEvent extends TypeSerializeInterface { String getType(); }