Interface ColorRegistry.Category
- Enclosing interface:
ColorRegistry
public static interface ColorRegistry.Category
A color category.
- Since:
- 3.2.0
-
Method Summary
Modifier and TypeMethodDescriptionGets a color key registered to this category with the given id, ornullif not found.keys()Access the all the color keys registered to this category.Gets the localization key of the given color key.default ColorRegistry.CategoryRegisters a color key.Registers a color key.
-
Method Details
-
key
Gets a color key registered to this category with the given id, ornullif not found.- Parameters:
colorId- The identifier of the color.- Returns:
- The
ColorKeyinstance linked to the given id, ornullif not found. - Since:
- 3.2.0
-
keyUnlocalizedName
Gets the localization key of the given color key.- Parameters:
key- The color key.- Returns:
- The unlocalized name of the given color key.
- Since:
- 3.2.0
-
register
Registers a color key.The GUI name of the color key is obtained by localizing the string
shulkerboxtooltip.colors.MOD_ID.CATEGORY_ID.KEY_ID, WhereMOD_IDis the namespace of the category's ID,CATEGORY_IDis the path of the category's ID, andKEY_IDis thecolorIdparameter.- Parameters:
key- The color key to register.colorId- The name of this color key.- Returns:
- This category instance to allow chaining.
- Since:
- 3.2.0
-
register
Registers a color key.The GUI name of the color key is obtained by localizing the string
unlocalizedName, or when the parameter is null,shulkerboxtooltip.colors.MOD_ID.CATEGORY_ID.KEY_ID, WhereMOD_IDis the namespace of the category's ID,CATEGORY_IDis the path of the category's ID, andKEY_IDis thecolorIdparameter.- Parameters:
key- The color key to register.colorId- The name of this color key.unlocalizedName- The unlocalized name of the key, passnullto use the default name.- Returns:
- This category instance to allow chaining.
- Since:
- 3.2.0
-
keys
Access the all the color keys registered to this category.- Returns:
- An immutable view over the existing keys in this category.
- Since:
- 3.2.0
-