Loading lang files
Creating the lang file:
To load a lang file, you have two ways, one is having a lang file prepared, the other is to populate in-code.
public class MyResourcePack {
public static Texture EXAMPLE;
public static void load(Plugin plugin) {
ResourcePack pack = new ResourcePack(plugin, "plugin_id");
Namespace ns = pack.namespace("plugin_id");
Lang enUs = ns.lang("en_us", false);
enUs.put("my.translation.key", "My Key");
pack.register(false);
}
}
03 October 2025