diff --git a/src/main/java/org/hmcore/modules/Module.java b/src/main/java/org/hmcore/modules/Module.java index f44d434..51f146f 100644 --- a/src/main/java/org/hmcore/modules/Module.java +++ b/src/main/java/org/hmcore/modules/Module.java @@ -4,11 +4,11 @@ import org.hmcore.registration.ObjectInfo; /** * Represents a module that manages the objects that should get registered to Hytale. + * * @param The object that should get registered * @param Object that contains information about the object. Like the texture. */ public abstract class Module { - // // For registering Objects to Module and getting them // Made for mods to call them @@ -16,6 +16,7 @@ public abstract class Module { /** * For checking if the Module has the module already in its list. + * * @param name The name or registration key of the object to be checked * @return true when the object is already registered. */ @@ -23,6 +24,7 @@ public abstract class Module { /** * Gets the object for the registered name. + * * @param name The name or key for the object that should be returned. * @return The object under the registered name or null if it doesn't exists. */ @@ -30,7 +32,8 @@ public abstract class Module { /** * Registers the object to the module. - * @param name The name or key for the object to get registered under. + * + * @param name The name or key for the object to get registered under. * @param object The object that should get registered. */ public abstract void register(String name, T object); @@ -42,8 +45,9 @@ public abstract class Module { * Adds an option for information to the object. * There can be multiple options for information and the server administrators can choose which to use. * Per default the first registered option is used. - * @param name The name or key for the object the information should be added to. - * @param infoName The name of the option. The name of the mod as example. + * + * @param name The name or key for the object the information should be added to. + * @param infoName The name of the option. The name of the mod as example. * @param objectInfo The info object that supplies the module with the required information. */ public abstract void addInfoToObject(String name, String infoName, I objectInfo); @@ -51,11 +55,12 @@ public abstract class Module { /** * Simple utility function that automatically checks if the object already exists. * If not, the object is registered. An easy boilerplate code prevention. + * * @param name * @param object */ public void registerIfNonExistent(String name, T object) { - if(!contains(name)) register(name, object); + if (!contains(name)) register(name, object); } // @@ -65,8 +70,8 @@ public abstract class Module { /** * Gets called when the phase of object registration to Hytale has come. + * * @return true when every object has been registered successfully. */ public abstract boolean registerObjects(); - } diff --git a/src/main/kotlin/org/hmcore/registration/ObjectInfo.kt b/src/main/kotlin/org/hmcore/registration/ObjectInfo.kt index 18a8ae8..f2b5c03 100644 --- a/src/main/kotlin/org/hmcore/registration/ObjectInfo.kt +++ b/src/main/kotlin/org/hmcore/registration/ObjectInfo.kt @@ -1,5 +1,3 @@ package org.hmcore.registration -open class ObjectInfo(val texturePath: String) { - -} \ No newline at end of file +open class ObjectInfo(val texturePath: String)