Package xyz.gmitch215.socketmc.config
Enum Class ModPermission
- All Implemented Interfaces:
Serializable
,Comparable<ModPermission>
,Constable
Represents the permissions for the SocketMC Mod.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPermission to change various soft game preferences, such as social interactions.Permission to use external applications and integrations.Permission to openhttp://
andhttps://
links.Permission to read various client game properties, such as command history and in-game information.Permission to read various GUI properties, such as window information and the game's paused state.Permission to read various system properties, such as memory usage.The permission for the mod to be enabled and work properly.Permission to use the audio system.Permission to manage the GUI.Permission to open and close default and user-generated screens. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the default value of the permission.getKey()
Returns the translation key for the permission.Returns the translation key for the permission's tooltip.boolean
Gets whether the permission can be changed by the user.static ModPermission
Returns the enum constant of this class with the specified name.static ModPermission[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REQUIRED
The permission for the mod to be enabled and work properly. Used in essential permissions, such asInstruction.ping()
, and retrievers that cannot be disabled, such asRetrieverType.PLUGIN_PERMISSIONS
. -
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
Permission to open and close default and user-generated screens. -
USE_AUDIO
Permission to use the audio system. -
OPEN_LINKS
Permission to openhttp://
andhttps://
links. -
EXTERNAL_APPLICATIONS
Permission to use external applications and integrations.
This permission also grants using non-web links speciifed by
OPEN_LINKS
, such asmailto:
links. -
READ_SYSTEM_PROPERTIES
Permission to read various system properties, such as memory usage.
RetrieverType.OPERATING_SYSTEM
is not included, which is marked withREQUIRED
. -
READ_GUI_PROPERTIES
Permission to read various GUI properties, such as window information and the game's paused state. -
READ_GAME_PROPERTIES
Permission to read various client game properties, such as command history and in-game information. -
CHANGE_GAME_PREFERENCES
Permission to change various soft game preferences, such as social interactions.
-
-
Method Details
-
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
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 nameNullPointerException
- 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
Returns the translation key for the permission.- Returns:
- the key for the permission
-
getTooltip
Returns the translation key for the permission's tooltip.- Returns:
- the tooltip for the permission
-