Class UIModule

All Implemented Interfaces:
CommandOwner

public class UIModule extends JavaPlugin
  • Field Details

  • Constructor Details

  • Method Details

    • get

      public static UIModule 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. The typeName must 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

      public boolean registerEnumDefinition(@Nonnull String typeName, @Nonnull List<String> values)
      Registers a view model enum. The typeName must 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

      @Nonnull public UIModule.ClassDefinitionBuilder defineClass(@Nonnull String typeName)
      Returns a builder for registering a view model class with the given type name. Call UIModule.ClassDefinitionBuilder.register() to commit the definition. Use UITypes constants (or a static import of it) for property type strings. A successful register() 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