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

    Constructors
    Constructor
    Description
    SlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin)
    Constructor
    SlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin, String folderName)
    Constructor
    SlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin, String folderName, String langFile)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
     
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    getItem(String id, String texture, String... extraLore)
    Get the SlimefunItemStack with specified id and head texture.
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    getItem(String id, org.bukkit.inventory.ItemStack itemStack, String... extraLore)
    Get the SlimefunItemStack with specified id and Material.
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    getItem(String id, org.bukkit.Material material, String... extraLore)
    Get the SlimefunItemStack with specified id and Material.
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    getItemBy(String key, String id, String texture, String... extraLore)
    Get the SlimefunItemStack with specified key, id and head texture.
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    getItemBy(String key, String id, org.bukkit.inventory.ItemStack itemStack, String... extraLore)
    Get the SlimefunItemStack with specified key, id and ItemStack.
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    getItemBy(String key, String id, org.bukkit.Material material, String... extraLore)
    Get the SlimefunItemStack with specified key, id and Material.
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    Get the SlimefunItemStack for ItemGroup.
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    getItemGroupItem(String id, org.bukkit.inventory.ItemStack itemStack)
    Get the SlimefunItemStack for ItemGroup.
    io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
    getItemGroupItem(String id, org.bukkit.Material material)
    Get the SlimefunItemStack for ItemGroup.
    io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType
    getRecipeType(String id, String texture, String... extraLore)
    Get the RecipeType with specified id and head texture.
    io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType
    getRecipeType(String id, org.bukkit.inventory.ItemStack itemStack, String... extraLore)
    Get the RecipeType with specified id and ItemStack.
    io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType
    getRecipeType(String id, org.bukkit.Material material, String... extraLore)
    Get the RecipeType with specified id and Material.
    void
    setIdPrefix(String idPrefix)
     
    void
    setItemGroupKey(String itemGroupKey)
    The key of ItemGroups in language file.
    void
    setItemsKey(String itemsKey)
    The key of items in language file.
    void
    setRecipesKey(String recipesKey)
    The key of recipe types in language file.

    Methods inherited from class net.guizhanss.guizhanlib.minecraft.localization.MinecraftLocalization

    getString, getStringArray, getStringList

    Methods inherited from class net.guizhanss.guizhanlib.localization.Localization

    addLanguage, getPlugin

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SlimefunLocalization

      @ParametersAreNonnullByDefault public SlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin)
      Constructor
      Parameters:
      plugin - The JavaPlugin instance
    • SlimefunLocalization

      @ParametersAreNonnullByDefault public SlimefunLocalization(org.bukkit.plugin.java.JavaPlugin plugin, String folderName)
      Constructor
      Parameters:
      plugin - The JavaPlugin instance
      folderName - 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 - The JavaPlugin instance
      folderName - The name of the folder that holds all language files
      langFile - 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 the SlimefunItemStack with specified key, id and Material.
      Parameters:
      key - The key to read item from in language file.
      id - The id of item.
      material - The Material of item.
      extraLore - The extra lore to append to the end of current lore.
      Returns:
      The SlimefunItemStack with specified id and Material.
    • getItemBy

      @Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemBy(String key, String id, String texture, String... extraLore)
      Get the SlimefunItemStack with 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 SlimefunItemStack with 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 the SlimefunItemStack with specified key, id and ItemStack.
      Parameters:
      key - The key to read item from in language file.
      id - The id of item.
      itemStack - The ItemStack.
      extraLore - The extra lore to append to the end of current lore.
      Returns:
      The SlimefunItemStack with specified id and ItemStack.
    • getItemGroupItem

      @Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemGroupItem(String id, org.bukkit.Material material)
      Get the SlimefunItemStack for ItemGroup.
      Parameters:
      id - The id of category.
      material - The Material of item.
      Returns:
      The SlimefunItemStack with specified id and Material.
    • getItemGroupItem

      @Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemGroupItem(String id, String texture)
      Get the SlimefunItemStack for ItemGroup.
      Parameters:
      id - The id of category.
      texture - The texture of head.
      Returns:
      The SlimefunItemStack with specified id and Material.
    • getItemGroupItem

      @Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItemGroupItem(String id, org.bukkit.inventory.ItemStack itemStack)
      Get the SlimefunItemStack for ItemGroup.
      Parameters:
      id - The id of category.
      itemStack - The ItemStack of item.
      Returns:
      The SlimefunItemStack with specified id and Material.
    • getItem

      public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItem(String id, org.bukkit.Material material, String... extraLore)
      Get the SlimefunItemStack with specified id and Material.
      Parameters:
      id - The id of item.
      material - The Material of item.
      extraLore - The extra lore to append to the end of current lore.
      Returns:
      The SlimefunItemStack with specified id and Material.
    • getItem

      @Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack getItem(String id, String texture, String... extraLore)
      Get the SlimefunItemStack with 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 SlimefunItemStack with 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 the SlimefunItemStack with specified id and Material.
      Parameters:
      id - The id of item.
      itemStack - The ItemStack.
      extraLore - The extra lore to append to the end of current lore.
      Returns:
      The SlimefunItemStack with specified id and ItemStack.
    • getRecipeType

      @Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType getRecipeType(String id, org.bukkit.Material material, String... extraLore)
      Get the RecipeType with specified id and Material.
      Parameters:
      id - The id of item.
      material - The Material of item.
      extraLore - The extra lore to append to the end of current lore.
      Returns:
      The RecipeType with specified id and Material.
    • getRecipeType

      @Nonnull @ParametersAreNonnullByDefault public io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType getRecipeType(String id, String texture, String... extraLore)
      Get the RecipeType with 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 RecipeType with 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 the RecipeType with specified id and ItemStack.
      Parameters:
      id - The id of item.
      itemStack - The ItemStack.
      extraLore - The extra lore to append to the end of current lore.
      Returns:
      The RecipeType with specified id and ItemStack.
    • getIdPrefix

      public String getIdPrefix()
    • setIdPrefix

      public void setIdPrefix(String idPrefix)
    • setItemGroupKey

      public void setItemGroupKey(String itemGroupKey)
      The key of ItemGroups in language file.
    • setItemsKey

      public void setItemsKey(String itemsKey)
      The key of items in language file.
    • setRecipesKey

      public void setRecipesKey(String recipesKey)
      The key of recipe types in language file.