MCLang [1.13x - 1.21x] icon

MCLang [1.13x - 1.21x] -----

Official Language Pack API for your Minecraft Bukkit plugins.



MCLang

Github Status
[​IMG] [​IMG]

SpigotMC Status
[​IMG] [​IMG]

bStats Status
[​IMG] [​IMG]

Official Language Pack API for your Minecraft Bukkit plugins.

Tested Minecraft versions: 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21

Features
  • Easy-to-use language pack management for Bukkit plugins
  • Language packs for different Minecraft versions can be downloaded from GitHub
  • Automatically downloads language packs from the official Minecraft resources if not present
  • Hot-reload language files without server restart
  • API for developers to integrate custom messages
Docs JDOC
Gradle
Code (Text):
repositories {
   mavenCentral()
   maven { url 'https://repo1.maven.org/maven2/' }
}
dependencies {
   compileOnly 'org.tsob:MCLang-API:1.0.8'
}
Maven
Code (Text):
<repositories>
   <repository>
       <id>maven</id>
       <url>https://repo1.maven.org/maven2/</url>
   </repository>
</repositories>

<dependency>
  <groupId>org.tsob</groupId>
  <artifactId>MCLang-API</artifactId>
  <version>1.0.8</version>
  <scope>provided</scope>
</dependency>
Example
Code (Java):
import org.tsob.MCLang.API.MCLang ;
import org.bukkit.Material ;
import org.bukkit.entity.EntityType ;
import org.bukkit.inventory.ItemStack ;

public class ExamplePlugin extends JavaPlugin {
  @Override
  public void onEnable ( ) {
 
    MCLang lang = new MCLang ( "en" ) ;

    // Get translation for an ItemStack
    ItemStack item = new ItemStack (Material. DIAMOND_SWORD ) ;
    String itemTranslation = lang. getItemTranslate (item ) ;

    // Directly read the translation from the language pack.
    String translation = getString ( "item.minecraft.diamond_sword" ) ;

    // Get translation for an item name
    String itemTranslationByName = lang. getItemTranslate ( "DIAMOND_SWORD" ) ;

    // Get translation for an EntityType
    String entityTranslation = lang. getEntityTranslate (EntityType. CREEPER ) ;

    // Get translation for an entity name
    String entityTranslationByName = lang. getEntityTranslate ( "CREEPER" ) ;

    // Get translation for an enchantment (version 1.0.8 add)
    String enchantmentTranslationByName = lang. getEnchantmentTranslate (Enchantment. SILK_TOUCH ) ;

    // Get translation for an enchantment name (version 1.0.8 add)
    String enchantmentTranslationByName = lang. getEnchantmentTranslate ( "SILK_TOUCH" ) ;
}
TODO
  • Improve API documentation
  • Add more usage examples
  • Move the file download to asynchronous execution, and temporarily use en_us until the download is complete.
Resource Information
Author:
----------
Total Downloads: 54
First Release: Jun 9, 2025
Last Update: Jun 13, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings