java.lang.Object
com.github.stefvanschie.inventoryframework.font.util.Font
Direct Known Subclasses:
CSVFont

public abstract class Font extends Object
An interface for fonts
Since:
0.5.0
  • Field Details

    • BIRCH_PLANKS

      public static final Font BIRCH_PLANKS
      The birch planks font
    • BLACK

      public static final Font BLACK
      The black font
    • BLUE

      public static final Font BLUE
      The blue font
    • BROWN

      public static final Font BROWN
      The brown font
    • COBBLESTONE

      public static final Font COBBLESTONE
      The cobblestone font
    • CYAN

      public static final Font CYAN
      The cyan font
    • DIAMOND

      public static final Font DIAMOND
      The diamond font
    • DIRT

      public static final Font DIRT
      The dirt font
    • GOLD

      public static final Font GOLD
      The gold font
    • GRAY

      public static final Font GRAY
      The gray font
    • GREEN

      public static final Font GREEN
      The green font
    • JUNGLE_PLANKS

      public static final Font JUNGLE_PLANKS
      The jungle planks font
    • LETTER_CUBE

      public static final Font LETTER_CUBE
      The letter cube font
    • LIGHT_BLUE

      public static final Font LIGHT_BLUE
      The light blue font
    • LIGHT_GRAY

      public static final Font LIGHT_GRAY
      The light gray font
    • LIME

      public static final Font LIME
      The lime font
    • MAGENTA

      public static final Font MAGENTA
      The magenta font
    • MONITOR

      public static final Font MONITOR
      The monitor font
    • OAK_LOG

      public static final Font OAK_LOG
      The oak log font
    • OAK_PLANKS

      public static final Font OAK_PLANKS
      The oak planks font
    • ORANGE

      public static final Font ORANGE
      The orange font
    • PINK

      public static final Font PINK
      The pink font
    • PLUSH

      public static final Font PLUSH
      The plush font
    • PUMPKIN

      public static final Font PUMPKIN
      The pumpkin font
    • PURPLE

      public static final Font PURPLE
      The purple font
    • QUARTZ

      public static final Font QUARTZ
      The quartz font
    • RAINBOW

      public static final Font RAINBOW
      The rainbow font
    • RED

      public static final Font RED
      The red font
    • SPRUCE_PLANKS

      public static final Font SPRUCE_PLANKS
      The spruce planks font
    • STONE

      public static final Font STONE
      The stone font
    • WATERMELON

      public static final Font WATERMELON
      The watermelon font
    • WHITE

      public static final Font WHITE
      The white font
    • YELLOW

      public static final Font YELLOW
      The yellow font
  • Constructor Details

    • Font

      public Font()
  • Method Details

    • getDefaultItem

      @NotNull @Contract(pure=true) public abstract @NotNull 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 ItemStack toItem(char character)
      Turns the specified character into an ItemStack 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

      @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 name
      font - the font
      Since:
      0.5.0