Package org.bukkit.map
Class MapFont
java.lang.Object
org.bukkit.map.MapFont
- Direct Known Subclasses:
- MinecraftFont
Represents a bitmap font drawable to a map.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classRepresents the graphics for a single character in a MapFont.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetChar(char ch) Get the sprite for a given character.intGet the height of this font.intGet the width of the given text as it would be rendered using this font.booleanCheck whether the given text is valid.voidsetChar(char ch, @NotNull MapFont.CharacterSprite sprite) Set the sprite for a given character.
- 
Field Details- 
malleableprotected boolean malleable
 
- 
- 
Constructor Details- 
MapFontpublic MapFont()
 
- 
- 
Method Details- 
setCharSet the sprite for a given character.- Parameters:
- ch- The character to set the sprite for.
- sprite- The CharacterSprite to set.
- Throws:
- IllegalStateException- if this font is static.
 
- 
getCharGet the sprite for a given character.- Parameters:
- ch- The character to get the sprite for.
- Returns:
- The CharacterSprite associated with the character, or null if there is none.
 
- 
getWidthGet the width of the given text as it would be rendered using this font.- Parameters:
- text- The text.
- Returns:
- The width in pixels.
 
- 
getHeightpublic int getHeight()Get the height of this font.- Returns:
- The height of the font.
 
- 
isValidCheck whether the given text is valid.- Parameters:
- text- The text.
- Returns:
- True if the string contains only defined characters, false otherwise.
 
 
-