Contents
Class UIModule
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.server.core.modules.ui.UIModule
- All Implemented Interfaces:
CommandOwner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent builder for a view model class definition. -
Field Summary
FieldsFields inherited from class PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefineClass(String typeName) Returns a builder for registering a view model class with the given type name.static UIModuleget()booleanregisterClassDefinition(String typeName, Map<String, String> properties) Registers a view model class with no base type.booleanRegisters a view model class.booleanregisterEnumDefinition(String typeName, List<String> values) Registers a view model enum.static voidMethods inherited from class JavaPlugin
getClassLoader, getFile, getTypeMethods inherited from class PluginBase
getAssetRegistry, getBasePermission, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad
-
Field Details
-
MANIFEST
-
-
Constructor Details
-
UIModule
-
-
Method Details
-
get
-
requireServersideNoesisUi
public static void requireServersideNoesisUi() -
registerClassDefinition
public boolean registerClassDefinition(@Nonnull String typeName, @Nonnull Map<String, String> properties, @Nullable String baseTypeName) Registers a view model class. ThetypeNamemust start with"Server.". Duplicate type names are rejected with a warning. A successful registration sends that class definition to all online players immediately.Part of an upcoming feature that is still in development and not yet ready for production use. Do not use. The API is not final and may change.
- Parameters:
typeName- The fully qualified type name, e.g."Server.MyMod.GameState".properties- Property name to property type string map.baseTypeName- Optional base type name for inheritance.- Returns:
- whether the type was registered or not
-
registerClassDefinition
public boolean registerClassDefinition(@Nonnull String typeName, @Nonnull Map<String, String> properties) Registers a view model class with no base type. A successful registration sends that class definition to all online players immediately.Part of an upcoming feature that is still in development and not yet ready for production use. Do not use. The API is not final and may change.
- Parameters:
typeName- The fully qualified type name, e.g."Server.MyMod.GameState".properties- Property name to property type string map.- Returns:
- whether the type was registered or not
-
registerEnumDefinition
Registers a view model enum. ThetypeNamemust start with"Server.". Duplicate type names are rejected with a warning. A successful registration sends that enum definition to all online players immediately.Part of an upcoming feature that is still in development and not yet ready for production use. Do not use. The API is not final and may change.
- Parameters:
typeName- The fully qualified enum name, e.g."Server.MyMod.Direction".values- The ordered list of enum member names.- Returns:
- whether the type was registered or not
-
defineClass
Returns a builder for registering a view model class with the given type name. CallUIModule.ClassDefinitionBuilder.register()to commit the definition. UseUITypesconstants (or a static import of it) for property type strings. A successfulregister()call sends that class definition to all online players immediately.Part of an upcoming feature that is still in development and not yet ready for production use. Do not use. The API is not final and may change.
- Parameters:
typeName- The fully qualified type name; must start with"Server.".- Returns:
- the builder
-