Fix formatting

This commit is contained in:
Wieland Schöbl
2021-04-11 17:07:13 +02:00
parent 5bbf32d8d9
commit ddb6ff2884
2 changed files with 12 additions and 9 deletions

View File

@@ -4,11 +4,11 @@ import org.hmcore.registration.ObjectInfo;
/** /**
* Represents a module that manages the objects that should get registered to Hytale. * Represents a module that manages the objects that should get registered to Hytale.
*
* @param <T> The object that should get registered * @param <T> The object that should get registered
* @param <I> Object that contains information about the object. Like the texture. * @param <I> Object that contains information about the object. Like the texture.
*/ */
public abstract class Module<T, I extends ObjectInfo> { public abstract class Module<T, I extends ObjectInfo> {
// //
// For registering Objects to Module and getting them // For registering Objects to Module and getting them
// Made for mods to call them // Made for mods to call them
@@ -16,6 +16,7 @@ public abstract class Module<T, I extends ObjectInfo> {
/** /**
* For checking if the Module has the module already in its list. * 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 * @param name The name or registration key of the object to be checked
* @return true when the object is already registered. * @return true when the object is already registered.
*/ */
@@ -23,6 +24,7 @@ public abstract class Module<T, I extends ObjectInfo> {
/** /**
* Gets the object for the registered name. * Gets the object for the registered name.
*
* @param name The name or key for the object that should be returned. * @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. * @return The object under the registered name or null if it doesn't exists.
*/ */
@@ -30,6 +32,7 @@ public abstract class Module<T, I extends ObjectInfo> {
/** /**
* Registers the object to the 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. * @param object The object that should get registered.
*/ */
@@ -42,6 +45,7 @@ public abstract class Module<T, I extends ObjectInfo> {
* Adds an option for information to the object. * Adds an option for information to the object.
* There can be multiple options for information and the server administrators can choose which to use. * There can be multiple options for information and the server administrators can choose which to use.
* Per default the first registered option is used. * Per default the first registered option is used.
*
* @param name The name or key for the object the information should be added to. * @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 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. * @param objectInfo The info object that supplies the module with the required information.
@@ -51,6 +55,7 @@ public abstract class Module<T, I extends ObjectInfo> {
/** /**
* Simple utility function that automatically checks if the object already exists. * Simple utility function that automatically checks if the object already exists.
* If not, the object is registered. An easy boilerplate code prevention. * If not, the object is registered. An easy boilerplate code prevention.
*
* @param name * @param name
* @param object * @param object
*/ */
@@ -65,8 +70,8 @@ public abstract class Module<T, I extends ObjectInfo> {
/** /**
* Gets called when the phase of object registration to Hytale has come. * Gets called when the phase of object registration to Hytale has come.
*
* @return true when every object has been registered successfully. * @return true when every object has been registered successfully.
*/ */
public abstract boolean registerObjects(); public abstract boolean registerObjects();
} }

View File

@@ -1,5 +1,3 @@
package org.hmcore.registration package org.hmcore.registration
open class ObjectInfo(val texturePath: String) { open class ObjectInfo(val texturePath: String)
}