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 FontThe birch planks fontstatic FontThe black fontstatic FontThe blue fontstatic FontThe brown fontstatic FontThe cobblestone fontstatic FontThe cyan fontstatic FontThe diamond fontstatic FontThe dirt fontstatic FontThe gold fontstatic FontThe gray fontstatic FontThe green fontstatic FontThe jungle planks fontstatic FontThe letter cube fontstatic FontThe light blue fontstatic FontThe light gray fontstatic FontThe lime fontstatic FontThe magenta fontstatic FontThe monitor fontstatic FontThe oak log fontstatic FontThe oak planks fontstatic FontThe orange fontstatic FontThe pink fontstatic FontThe plush fontstatic FontThe pumpkin fontstatic FontThe purple fontstatic FontThe quartz fontstatic FontThe rainbow fontstatic FontThe red fontstatic FontThe spruce planks fontstatic FontThe stone fontstatic FontThe watermelon fontstatic FontThe white fontstatic FontThe yellow font -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable FontGets a font by its name.abstract @NotNull org.bukkit.inventory.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 org.bukkit.inventory.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
@NotNull @Contract(pure=true) public abstract @NotNull org.bukkit.inventory.ItemStack getDefaultItem()Gets a default item for characters that do not have a dedicated item- Returns:
- the default item
- Since:
- 0.5.0
-
toItem
@Nullable @Contract(pure=true) public abstract @Nullable org.bukkit.inventory.ItemStack toItem(char character)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
@Nullable @Contract(pure=true) public static @Nullable Font fromName(@NotNull @NotNull String name)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
-