# LanguageUtils (ShopChest 1.12 API)
Date: 2017-06-08

de.epiceric.shopchest.language

## Class LanguageUtils

- java.lang.Object
- - de.epiceric.shopchest.language.LanguageUtils

    public class LanguageUtils
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`LanguageUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `getBookGenerationName(CustomBookMeta.Generation generation)`
`static String` `getEnchantmentName(org.bukkit.enchantments.Enchantment enchantment, int level)`
`static String` `getEnchantmentString(Map<org.bukkit.enchantments.Enchantment,Integer> enchantmentMap)`
`static String` `getItemName(org.bukkit.inventory.ItemStack stack)`
`static String` `getMessage(LocalizedMessage.Message message, LocalizedMessage.ReplacedPlaceholder... replacedPlaceholders)`
`static String` `getMusicDiscName(org.bukkit.Material musicDiscMaterial)`
`static String` `getPotionEffectName(org.bukkit.inventory.ItemStack itemStack)`
`static void` `load()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LanguageUtils

    public LanguageUtils()

### Method Detail

#### load

    public static void load()

#### getItemName

    public static String getItemName(org.bukkit.inventory.ItemStack stack)

Parameters:
  `stack` - Item whose name to lookup
Returns:
  Localized Name of the Item, the custom name, or if stack is a book, the title of the book

#### getEnchantmentName

    public static String getEnchantmentName(org.bukkit.enchantments.Enchantment enchantment,
                                            int level)

Parameters:
  `enchantment` - Enchantment whose name should be looked up
  `level` - Level of the enchantment
Returns:
  Localized Name of the enchantment with the given level afterwards

#### getEnchantmentString

    public static String getEnchantmentString(Map<org.bukkit.enchantments.Enchantment,Integer> enchantmentMap)

Parameters:
  `enchantmentMap` - Map of enchantments of an item
Returns:
  Comma separated list of localized enchantments

#### getPotionEffectName

    public static String getPotionEffectName(org.bukkit.inventory.ItemStack itemStack)

Parameters:
  `itemStack` - Potion Item whose base effect name should be looked up
Returns:
  Localized Name of the Base Potion Effect

#### getMusicDiscName

    public static String getMusicDiscName(org.bukkit.Material musicDiscMaterial)

Parameters:
  `musicDiscMaterial` - Material of the Music Disc whose name should be looked up
Returns:
  Localized title of the Music Disc

#### getBookGenerationName

    public static String getBookGenerationName(CustomBookMeta.Generation generation)

Parameters:
  `generation` - Generation of the book
Returns:
  Localized title of the generation

#### getMessage

    public static String getMessage(LocalizedMessage.Message message,
                                    LocalizedMessage.ReplacedPlaceholder... replacedPlaceholders)

Parameters:
  `message` - Message which should be translated
  `replacedPlaceholders` - Placeholders which might be required to be replaced in the message
Returns:
  Localized Message