Class CSVFont

java.lang.Object
me.despical.inventoryframework.font.util.Font
me.despical.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:
1.0.1

Created at 04.09.2020

Author:
Despical
  • 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:
      1.0.1
  • Method Details

    • getDefaultItem

      @NotNull @Contract(pure=true) public @NotNull org.bukkit.inventory.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 org.bukkit.inventory.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