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

public abstract class Font
extends java.lang.Object
An interface for fonts
Since:
0.5.0
  • Field Summary

    Fields
    Modifier and Type Field Description
    static Font BIRCH_PLANKS
    The birch planks font
    static Font BLACK
    The black font
    static Font BLUE
    The blue font
    static Font BROWN
    The brown font
    static Font COBBLESTONE
    The cobblestone font
    static Font CYAN
    The cyan font
    static Font DIAMOND
    The diamond font
    static Font DIRT
    The dirt font
    static Font GOLD
    The gold font
    static Font GRAY
    The gray font
    static Font GREEN
    The green font
    static Font JUNGLE_PLANKS
    The jungle planks font
    static Font LETTER_CUBE
    The letter cube font
    static Font LIGHT_BLUE
    The light blue font
    static Font LIGHT_GRAY
    The light gray font
    static Font LIME
    The lime font
    static Font MAGENTA
    The magenta font
    static Font MONITOR
    The monitor font
    static Font OAK_LOG
    The oak log font
    static Font OAK_PLANKS
    The oak planks font
    static Font ORANGE
    The orange font
    static Font PINK
    The pink font
    static Font PLUSH
    The plush font
    static Font PUMPKIN
    The pumpkin font
    static Font PURPLE
    The purple font
    static Font QUARTZ
    The quartz font
    static Font RAINBOW
    The rainbow font
    static Font RED
    The red font
    static Font SPRUCE_PLANKS
    The spruce planks font
    static Font STONE
    The stone font
    static Font WATERMELON
    The watermelon font
    static Font WHITE
    The white font
    static Font YELLOW
    The yellow font
  • Constructor Summary

    Constructors
    Constructor Description
    Font()  
  • Method Summary

    Modifier and Type Method Description
    static @Nullable Font fromName​(@NotNull java.lang.String name)
    Gets a font by its name.
    abstract @NotNull org.bukkit.inventory.ItemStack getDefaultItem()
    Gets a default item for characters that do not have a dedicated item
    static void registerFont​(@NotNull java.lang.String name, @NotNull Font font)
    Registers a custom font so it can be used in lookups and XML files.
    abstract @Nullable org.bukkit.inventory.ItemStack toItem​(char character)
    Turns the specified character into an ItemStack representing the specified character.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 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 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 java.lang.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 java.lang.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