Class OptionsRegistry

java.lang.Object
plugily.projects.buildbattle.menus.options.OptionsRegistry

public class OptionsRegistry
extends Object
Author:
Plajer

Created at 23.12.2018

  • Constructor Details

    • OptionsRegistry

      public OptionsRegistry​(Main plugin)
  • Method Details

    • registerOption

      public void registerOption​(MenuOption option)
      Registers new menu option available in options menu in game.
      Parameters:
      option - option to register
      Throws:
      IllegalArgumentException - if option slot is same as one of already registered ones or ID of option is same as one of registered one
    • unregisterOption

      public void unregisterOption​(MenuOption option)
      Unregisters menu option that available in options menu
      Parameters:
      option - option to unregister
      Throws:
      IllegalArgumentException - if option doesn't exist
    • defineInventorySize

      public void defineInventorySize​(int size)
      Defines new size of options inventory
      Parameters:
      size - size to set
    • formatInventory

      public org.bukkit.inventory.Inventory formatInventory()
      Creates inventory with all of registered menu options
      Returns:
      options inventory
    • getRegisteredOptions

      public Set<MenuOption> getRegisteredOptions()
    • getMenuItem

      public org.bukkit.inventory.ItemStack getMenuItem()
    • getBiomesRegistry

      public BiomesRegistry getBiomesRegistry()
    • getPlayerHeadsRegistry

      public PlayerHeadsRegistry getPlayerHeadsRegistry()
    • getParticleRegistry

      public ParticleRegistry getParticleRegistry()
    • getPlugin

      public Main getPlugin()