Package org.tsob.MCLang.API
Interface IMCLang
- All Known Implementing Classes:
MCLang
public interface IMCLang
IMCLang Interface
Provides Minecraft language-related functions.
Minecraft 語言相關功能介面
- Author:
- brian
-
Method Summary
Modifier and TypeMethodDescriptiongetEnchantmentTranslate
(String enchantmentName) Get the translation of an enchantment by name.getEnchantmentTranslate
(org.bukkit.enchantments.Enchantment enchantment) Get the translation of an enchantment.getEntityTranslate
(String entityName) Get the translation of an entity name.getEntityTranslate
(org.bukkit.entity.Entity entity) Get the translation of an entity (boat, primed TNT, mobs, etc.).getEntityTranslate
(org.bukkit.entity.EntityType entityType) Deprecated.getItemTranslate
(String itemName) Get the translation of an item name.getItemTranslate
(org.bukkit.inventory.ItemStack item) Get the translation of an item.getLang()
Get or set the language.Get the translation data for the specified Minecraft Lang path.void
reload()
Reload the Minecraft Lang configuration file.void
Set the language.
-
Method Details
-
getLang
String getLang()Get or set the language. 取得或設定語言- Returns:
- Language code, e.g., "en_us", "zh_tw" 語言代碼,例如 "en_us"、"zh_tw" 等
-
setLang
Set the language. 設定語言- Parameters:
lang
- Language code, e.g., "en_us", "zh_tw" 語言代碼,例如 "en_us"、"zh_tw" 等
-
getString
Get the translation data for the specified Minecraft Lang path. 取得對應 Minecraft Lang 的資料- Returns:
- Translation string 翻譯資料
-
getItemTranslate
Get the translation of an item. 取得物品的翻譯- Parameters:
item
- The item to translate 要翻譯的物品- Returns:
- The translated item string 物品的翻譯字串
-
getItemTranslate
Get the translation of an item name. 取得物品名稱的翻譯- Parameters:
itemName
- The item name to translate 要翻譯的物品名稱- Returns:
- The translated item name string 物品名稱的翻譯字串
-
getEntityTranslate
Deprecated.It is recommended to usegetEntityTranslate(Entity)
for more complete entity information. 建議改用getEntityTranslate(Entity)
以取得更完整的實體資訊Get the translation of an entity (boat, primed TNT, mobs, etc.) by EntityType. 取得實體(船,觸發的tnt等,怪物)的翻譯- Parameters:
entityType
- The entity type to translate 要翻譯的實體類型- Returns:
- The translated entity string 實體的翻譯字串
-
getEntityTranslate
Get the translation of an entity (boat, primed TNT, mobs, etc.). 取得實體的翻譯 (船,觸發的tnt等,怪物)- Parameters:
entity
- The entity to translate 要翻譯的實體- Returns:
- The translated entity string 實體的翻譯字串
-
getEntityTranslate
Get the translation of an entity name. 取得實體名稱的翻譯- Parameters:
entityName
- The entity name to translate 要翻譯的實體名稱- Returns:
- The translated entity name string 實體名稱的翻譯字串
-
getEnchantmentTranslate
Get the translation of an enchantment by name. 取得附魔的翻譯- Parameters:
enchantmentName
- The enchantment name to translate 要翻譯的附魔名稱- Returns:
- The translated enchantment name string 附魔名稱的翻譯字串
-
getEnchantmentTranslate
Get the translation of an enchantment. 取得附魔的翻譯- Parameters:
enchantment
- The enchantment to translate 要翻譯的附魔- Returns:
- The translated enchantment string 附魔的翻譯字串
-
reload
void reload()Reload the Minecraft Lang configuration file. 重新讀取 Minecraft Lang 的設定檔
-
getEntityTranslate(Entity)
for more complete entity information.