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
FieldsModifier and TypeFieldDescriptionstatic final FontThe birch planks fontstatic final FontThe black fontstatic final FontThe blue fontstatic final FontThe brown fontstatic final FontThe cobblestone fontstatic final FontThe cyan fontstatic final FontThe diamond fontstatic final FontThe dirt fontstatic final FontThe gold fontstatic final FontThe gray fontstatic final FontThe green fontstatic final FontThe jungle planks fontstatic final FontThe letter cube fontstatic final FontThe light blue fontstatic final FontThe light gray fontstatic final FontThe lime fontstatic final FontThe magenta fontstatic final FontThe monitor fontstatic final FontThe oak log fontstatic final FontThe oak planks fontstatic final FontThe orange fontstatic final FontThe pink fontstatic final FontThe plush fontstatic final FontThe pumpkin fontstatic final FontThe purple fontstatic final FontThe quartz fontstatic final FontThe rainbow fontstatic final FontThe red fontstatic final FontThe spruce planks fontstatic final FontThe stone fontstatic final FontThe watermelon fontstatic final FontThe white fontstatic final FontThe yellow font -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable FontGets a font by its name.abstract @NotNull ItemStackGets a default item for characters that do not have a dedicated itemstatic voidregisterFont(@NotNull String name, @NotNull Font font) Registers a custom font so it can be used in lookups and XML files.abstract @Nullable ItemStacktoItem(char character) Turns the specified character into anItemStackrepresenting 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 anItemStackrepresenting 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
-