Class SlimefunLocalization
java.lang.Object
net.guizhanss.guizhanlib.localization.Localization
net.guizhanss.guizhanlib.minecraft.localization.MinecraftLocalization
net.guizhanss.guizhanlib.slimefun.addon.SlimefunLocalization
public class SlimefunLocalization
extends net.guizhanss.guizhanlib.minecraft.localization.MinecraftLocalization
Localization service for Slimefun addons.
The following fields can be changed with setter methods:
- idPrefix: The prefix of id for items, will be prepended to the id of item when constructing SlimefunItemStack.
- itemGroupKey: The key of ItemGroups in language file, default is "categories".
-
Constructor Summary
ConstructorsConstructorDescriptionSlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin) ConstructorSlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin, String folderName) ConstructorSlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin, String folderName, String langFile) Constructor -
Method Summary
Modifier and TypeMethodDescriptionio.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackGet theSlimefunItemStackwith specified id and head texture.io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackGet theSlimefunItemStackwith specified id andMaterial.io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackGet theSlimefunItemStackwith specified id andMaterial.io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackGet theSlimefunItemStackwith specified key, id and head texture.io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackGet theSlimefunItemStackwith specified key, id andItemStack.io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackGet theSlimefunItemStackwith specified key, id andMaterial.io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackgetItemGroupItem(String id, String texture) Get theSlimefunItemStackfor ItemGroup.io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackgetItemGroupItem(String id, org.bukkit.inventory.ItemStack itemStack) Get theSlimefunItemStackfor ItemGroup.io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStackgetItemGroupItem(String id, org.bukkit.Material material) Get theSlimefunItemStackfor ItemGroup.io.github.thebusybiscuit.slimefun4.api.recipes.RecipeTypegetRecipeType(String id, String texture, String... extraLore) Get theRecipeTypewith specified id and head texture.io.github.thebusybiscuit.slimefun4.api.recipes.RecipeTypegetRecipeType(String id, org.bukkit.inventory.ItemStack itemStack, String... extraLore) Get theRecipeTypewith specified id andItemStack.io.github.thebusybiscuit.slimefun4.api.recipes.RecipeTypegetRecipeType(String id, org.bukkit.Material material, String... extraLore) Get theRecipeTypewith specified id andMaterial.voidsetIdPrefix(String idPrefix) voidsetItemGroupKey(String itemGroupKey) The key of ItemGroups in language file.voidsetItemsKey(String itemsKey) The key of items in language file.voidsetRecipesKey(String recipesKey) The key of recipe types in language file.Methods inherited from class net.guizhanss.guizhanlib.minecraft.localization.MinecraftLocalization
getString, getStringArray, getStringListMethods inherited from class net.guizhanss.guizhanlib.localization.Localization
addLanguage, getPlugin
-
Constructor Details
-
SlimefunLocalization
@ParametersAreNonnullByDefault public SlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin) Constructor- Parameters:
plugin- TheJavaPlugininstance
-
SlimefunLocalization
@ParametersAreNonnullByDefault public SlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin, String folderName) Constructor- Parameters:
plugin- TheJavaPlugininstancefolderName- The name of the folder that holds all language files
-
SlimefunLocalization
@ParametersAreNonnullByDefault public SlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin, String folderName, String langFile) Constructor- Parameters:
plugin- TheJavaPlugininstancefolderName- The name of the folder that holds all language fileslangFile- The name of language file (without file extension .yml)
-
-
Method Details
-
getItemBy
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemBy(String key, String id, org.bukkit.Material material, String... extraLore) Get theSlimefunItemStackwith specified key, id andMaterial.- Parameters:
key- The key to read item from in language file.id- The id of item.material- TheMaterialof item.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
SlimefunItemStackwith specified id andMaterial.
-
getItemBy
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemBy(String key, String id, String texture, String... extraLore) Get theSlimefunItemStackwith specified key, id and head texture.- Parameters:
key- The key to read item from in language file.id- The id of item.texture- The texture of head.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
SlimefunItemStackwith specified id and head texture.
-
getItemBy
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemBy(String key, String id, org.bukkit.inventory.ItemStack itemStack, String... extraLore) Get theSlimefunItemStackwith specified key, id andItemStack.- Parameters:
key- The key to read item from in language file.id- The id of item.itemStack- TheItemStack.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
SlimefunItemStackwith specified id andItemStack.
-
getItemGroupItem
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemGroupItem(String id, org.bukkit.Material material) Get theSlimefunItemStackfor ItemGroup.- Parameters:
id- The id of category.material- TheMaterialof item.- Returns:
- The
SlimefunItemStackwith specified id andMaterial.
-
getItemGroupItem
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemGroupItem(String id, String texture) Get theSlimefunItemStackfor ItemGroup.- Parameters:
id- The id of category.texture- The texture of head.- Returns:
- The
SlimefunItemStackwith specified id andMaterial.
-
getItemGroupItem
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemGroupItem(String id, org.bukkit.inventory.ItemStack itemStack) Get theSlimefunItemStackfor ItemGroup.- Parameters:
id- The id of category.itemStack- TheItemStackof item.- Returns:
- The
SlimefunItemStackwith specified id andMaterial.
-
getItem
public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItem(String id, org.bukkit.Material material, String... extraLore) Get theSlimefunItemStackwith specified id andMaterial.- Parameters:
id- The id of item.material- TheMaterialof item.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
SlimefunItemStackwith specified id andMaterial.
-
getItem
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItem(String id, String texture, String... extraLore) Get theSlimefunItemStackwith specified id and head texture.- Parameters:
id- The id of item.texture- The texture of head.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
SlimefunItemStackwith specified id and head texture.
-
getItem
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItem(String id, org.bukkit.inventory.ItemStack itemStack, String... extraLore) Get theSlimefunItemStackwith specified id andMaterial.- Parameters:
id- The id of item.itemStack- TheItemStack.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
SlimefunItemStackwith specified id andItemStack.
-
getRecipeType
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType getRecipeType(String id, org.bukkit.Material material, String... extraLore) Get theRecipeTypewith specified id andMaterial.- Parameters:
id- The id of item.material- TheMaterialof item.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
RecipeTypewith specified id andMaterial.
-
getRecipeType
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType getRecipeType(String id, String texture, String... extraLore) Get theRecipeTypewith specified id and head texture.- Parameters:
id- The id of item.texture- The texture of head.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
RecipeTypewith specified id and head texture.
-
getRecipeType
@Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType getRecipeType(String id, org.bukkit.inventory.ItemStack itemStack, String... extraLore) Get theRecipeTypewith specified id andItemStack.- Parameters:
id- The id of item.itemStack- TheItemStack.extraLore- The extra lore to append to the end of current lore.- Returns:
- The
RecipeTypewith specified id andItemStack.
-
getIdPrefix
-
setIdPrefix
-
setItemGroupKey
The key of ItemGroups in language file. -
setItemsKey
The key of items in language file. -
setRecipesKey
The key of recipe types in language file.
-