Class Font
java.lang.Object
com.github.stefvanschie.inventoryframework.font.util.Font
- Direct Known Subclasses:
CSVFont
An interface for fonts
- Since:
- 0.5.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Font
The birch planks fontstatic final Font
The black fontstatic final Font
The blue fontstatic final Font
The brown fontstatic final Font
The cobblestone fontstatic final Font
The cyan fontstatic final Font
The diamond fontstatic final Font
The dirt fontstatic final Font
The gold fontstatic final Font
The gray fontstatic final Font
The green fontstatic final Font
The jungle planks fontstatic final Font
The letter cube fontstatic final Font
The light blue fontstatic final Font
The light gray fontstatic final Font
The lime fontstatic final Font
The magenta fontstatic final Font
The monitor fontstatic final Font
The oak log fontstatic final Font
The oak planks fontstatic final Font
The orange fontstatic final Font
The pink fontstatic final Font
The plush fontstatic final Font
The pumpkin fontstatic final Font
The purple fontstatic final Font
The quartz fontstatic final Font
The rainbow fontstatic final Font
The red fontstatic final Font
The spruce planks fontstatic final Font
The stone fontstatic final Font
The watermelon fontstatic final Font
The white fontstatic final Font
The yellow font -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Font
Gets a font by its name.abstract @NotNull ItemStack
Gets a default item for characters that do not have a dedicated itemstatic void
registerFont
(@NotNull String name, @NotNull Font font) Registers a custom font so it can be used in lookups and XML files.abstract @Nullable ItemStack
toItem
(char character) Turns the specified character into anItemStack
representing the specified character.
-
Field Details
-
BIRCH_PLANKS
The birch planks font -
BLACK
The black font -
BLUE
The blue font -
BROWN
The brown font -
COBBLESTONE
The cobblestone font -
CYAN
The cyan font -
DIAMOND
The diamond font -
DIRT
The dirt font -
GOLD
The gold font -
GRAY
The gray font -
GREEN
The green font -
JUNGLE_PLANKS
The jungle planks font -
LETTER_CUBE
The letter cube font -
LIGHT_BLUE
The light blue font -
LIGHT_GRAY
The light gray font -
LIME
The lime font -
MAGENTA
The magenta font -
MONITOR
The monitor font -
OAK_LOG
The oak log font -
OAK_PLANKS
The oak planks font -
ORANGE
The orange font -
PINK
The pink font -
PLUSH
The plush font -
PUMPKIN
The pumpkin font -
PURPLE
The purple font -
QUARTZ
The quartz font -
RAINBOW
The rainbow font -
RED
The red font -
SPRUCE_PLANKS
The spruce planks font -
STONE
The stone font -
WATERMELON
The watermelon font -
WHITE
The white font -
YELLOW
The yellow font
-
-
Constructor Details
-
Font
public Font()
-
-
Method Details
-
getDefaultItem
Gets a default item for characters that do not have a dedicated item- Returns:
- the default item
- Since:
- 0.5.0
-
toItem
Turns the specified character into anItemStack
representing the specified character. If there is no item for the specified character this will return null.- Parameters:
character
- the character to get an item from- Returns:
- the item
- Since:
- 0.5.0
-
fromName
Gets a font by its name. The name will be made uppercase and spaces will be replaced with underscore before trying to access it.- Parameters:
name
- the name of the font- Returns:
- the font
- Since:
- 0.5.0
-
registerFont
@Contract(pure=true) public static void registerFont(@NotNull @NotNull String name, @NotNull @NotNull Font font) Registers a custom font so it can be used in lookups and XML files. The name will be made upper case and spaces will be turned into underscores to ensure a standardized format for all font names.- Parameters:
name
- the font namefont
- the font- Since:
- 0.5.0
-