java.lang.Object
com.github.stefvanschie.inventoryframework.font.util.Font
com.github.stefvanschie.inventoryframework.font.CSVFont

public class CSVFont extends Font
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:
0.5.0
  • Constructor Details

    • CSVFont

      public CSVFont(char defaultCharacter, String filePath)
      Creates a new default font
      Parameters:
      defaultCharacter - the default character to use when a requested character cannot be found
      filePath - the relative file path to the csv file containing the character mappings
      Since:
      0.5.0
  • Method Details

    • getDefaultItem

      @NotNull @Contract(pure=true) public @NotNull ItemStack getDefaultItem()
      Description copied from class: Font
      Gets a default item for characters that do not have a dedicated item
      Specified by:
      getDefaultItem in class Font
      Returns:
      the default item
    • toItem

      @Nullable @Contract(pure=true) public @Nullable ItemStack toItem(char character)
      Description copied from class: Font
      Turns the specified character into an ItemStack representing the specified character. If there is no item for the specified character this will return null.
      Specified by:
      toItem in class Font
      Parameters:
      character - the character to get an item from
      Returns:
      the item