Enum PlatformType

java.lang.Object
java.lang.Enum<PlatformType>
net.blueva.arcade.api.module.PlatformType
All Implemented Interfaces:
Serializable, Comparable<PlatformType>

public enum PlatformType extends Enum<PlatformType>
Identifies the server platform a module targets.

The recommended way for modules to declare their target platform is through the platform field in module.yml. The core reads this value from the module descriptor before loading the module class, so that modules with platform-specific imports are never loaded on an incompatible platform.

When the platform field is absent from module.yml, the module is considered cross-platform (backward-compatible default for API 3.1 modules).

Since:
3.2
  • Enum Constant Details

    • MINECRAFT

      public static final PlatformType MINECRAFT
      Minecraft (Spigot / Paper / Folia) servers.
    • HYTALE

      public static final PlatformType HYTALE
      Hytale servers.
  • Method Details

    • values

      public static PlatformType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PlatformType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public static PlatformType fromString(String raw)
      Parses a platform type from a string (case-insensitive).
      Parameters:
      raw - the string to parse
      Returns:
      the matching PlatformType, or null if not found