程序包 org.bukkit.map
类 MapFont
java.lang.Object
org.bukkit.map.MapFont
- 直接已知子类:
MinecraftFont
Represents a bitmap font drawable to a map.
-
嵌套类概要
修饰符和类型类说明static class
Represents the graphics for a single character in a MapFont. -
字段概要
-
构造器概要
-
方法概要
修饰符和类型方法说明getChar
(char ch) Get the sprite for a given character.int
Get the height of this font.int
Get the width of the given text as it would be rendered using this font.boolean
Check whether the given text is valid.void
setChar
(char ch, MapFont.CharacterSprite sprite) Set the sprite for a given character.
-
字段详细资料
-
malleable
protected boolean malleable
-
-
构造器详细资料
-
MapFont
public MapFont()
-
-
方法详细资料
-
setChar
Set the sprite for a given character.- 参数:
ch
- The character to set the sprite for.sprite
- The CharacterSprite to set.- 抛出:
IllegalStateException
- if this font is static.
-
getChar
Get the sprite for a given character.- 参数:
ch
- The character to get the sprite for.- 返回:
- The CharacterSprite associated with the character, or null if there is none.
-
getWidth
Get the width of the given text as it would be rendered using this font.- 参数:
text
- The text.- 返回:
- The width in pixels.
-
getHeight
public int getHeight()Get the height of this font.- 返回:
- The height of the font.
-
isValid
Check whether the given text is valid.- 参数:
text
- The text.- 返回:
- True if the string contains only defined characters, false otherwise.
-