Enum Class ModPermission

java.lang.Object
java.lang.Enum<ModPermission>
xyz.gmitch215.socketmc.config.ModPermission
All Implemented Interfaces:
Serializable, Comparable<ModPermission>, Constable

public enum ModPermission extends Enum<ModPermission>
Represents the permissions for the SocketMC Mod.
  • Enum Constant Details

    • REQUIRED

      public static final ModPermission REQUIRED
      The permission for the mod to be enabled and work properly. Used in essential permissions, such as Instruction.ping(), and retrievers that cannot be disabled, such as RetrieverType.PLUGIN_PERMISSIONS.
    • USE_GUI

      public static final ModPermission USE_GUI

      Permission to manage the GUI.

      This permission includes everything used to manage what you see, confined to the game's operations. For example, this permission includes drawing on the HUD, managing the player's perspective camera, and drawing objects in the world.

      Everything included in USE_SCREENS is ignored by this permission.

      This permission is also used for retrievers that require input, such as RetrieverType.LAST_INPUT_TYPE.

    • USE_SCREENS

      public static final ModPermission USE_SCREENS
      Permission to open and close default and user-generated screens.
    • USE_AUDIO

      public static final ModPermission USE_AUDIO
      Permission to use the audio system.
    • EXTERNAL_APPLICATIONS

      public static final ModPermission EXTERNAL_APPLICATIONS

      Permission to use external applications and integrations.

      This permission also grants using non-web links speciifed by OPEN_LINKS, such as mailto: links.

    • READ_SYSTEM_PROPERTIES

      public static final ModPermission READ_SYSTEM_PROPERTIES

      Permission to read various system properties, such as memory usage.

      RetrieverType.OPERATING_SYSTEM is not included, which is marked with REQUIRED.

    • READ_GUI_PROPERTIES

      public static final ModPermission READ_GUI_PROPERTIES
      Permission to read various GUI properties, such as window information and the game's paused state.
    • READ_GAME_PROPERTIES

      public static final ModPermission READ_GAME_PROPERTIES
      Permission to read various client game properties, such as command history and in-game information.
    • CHANGE_GAME_PREFERENCES

      public static final ModPermission CHANGE_GAME_PREFERENCES
      Permission to change various soft game preferences, such as social interactions.
  • Method Details

    • values

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

      public static ModPermission valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isChangeable

      public boolean isChangeable()
      Gets whether the permission can be changed by the user.
      Returns:
      whether the permission can be changed by the user
    • getDefaultValue

      public boolean getDefaultValue()
      Returns the default value of the permission.
      Returns:
      the default value of the permission
    • getKey

      @NotNull public @NotNull String getKey()
      Returns the translation key for the permission.
      Returns:
      the key for the permission
    • getTooltip

      @NotNull public @NotNull String getTooltip()
      Returns the translation key for the permission's tooltip.
      Returns:
      the tooltip for the permission