Class CSVFont
java.lang.Object
me.despical.inventoryframework.font.util.Font
me.despical.inventoryframework.font.CSVFont
A font for characters with a space as default character. Only one instance of this class should ever exist and should
be used everywhere.
- Since:
- 1.0.1
Created at 04.09.2020
- Author:
- Despical
-
Field Summary
Fields inherited from class me.despical.inventoryframework.font.util.Font
BIRCH_PLANKS, BLACK, BLUE, BROWN, COBBLESTONE, CYAN, DIAMOND, DIRT, GOLD, GRAY, GREEN, JUNGLE_PLANKS, LETTER_CUBE, LIGHT_BLUE, LIGHT_GRAY, LIME, MAGENTA, MONITOR, OAK_LOG, OAK_PLANKS, ORANGE, PINK, PLUSH, PUMPKIN, PURPLE, QUARTZ, RAINBOW, RED, SPRUCE_PLANKS, STONE, WATERMELON, WHITE, YELLOW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.inventory.ItemStackGets a default item for characters that do not have a dedicated item@Nullable org.bukkit.inventory.ItemStacktoItem(char character) Turns the specified character into anItemStackrepresenting the specified character.Methods inherited from class me.despical.inventoryframework.font.util.Font
fromName, registerFont
-
Constructor Details
-
CSVFont
Creates a new default font- Parameters:
defaultCharacter- the default character to use when a requested character cannot be foundfilePath- the relative file path to the csv file containing the character mappings- Since:
- 1.0.1
-
-
Method Details
-
getDefaultItem
@NotNull @Contract(pure=true) public @NotNull org.bukkit.inventory.ItemStack getDefaultItem()Description copied from class:FontGets a default item for characters that do not have a dedicated item- Specified by:
getDefaultItemin classFont- Returns:
- the default item
-
toItem
@Nullable @Contract(pure=true) public @Nullable org.bukkit.inventory.ItemStack toItem(char character) Description copied from class:FontTurns the specified character into anItemStackrepresenting the specified character. If there is no item for the specified character this will return null.
-