Using FontResolver
How to use the FontResolver to implement your custom fonts
Last updated
Was this helpful?
How to use the FontResolver to implement your custom fonts
Last updated
Was this helpful?
The following are all part of the enum MinecraftKeyFont
UNIFORM (Smaller, quirky font)
DEFAULT (Default chat text)
ALT (Enchanting Table)
Fonts can only be sent by using the thus, you will always get a BaseComponent or TextComponent returned.
Minecraft only comes with 3 fonts, as shown at the top of the page. When using the FontResolver, you must choose between these 3 to implement into your String
. The first parameter is your string and the second parameter is the type of font defined in MinecraftKeyFont.
This can then be sent to the player via player.spigot().sendMessage(component);
You can also do a grab out of the client's resource pack language folder and use some custom fonts.
If the client does not have the font it can crash / kick the client. Only recommended if resource packs are enforced.