Class RadioButton

java.lang.Object
ua.mcchickenstudio.opencreative.menus.buttons.RadioButton

public class RadioButton extends Object

RadioButton

This class represents RadioButton that has multiple choices and actions for changing current choice.
  • Constructor Details

    • RadioButton

      public RadioButton(org.bukkit.Material material, String name, List<String> lore, int currentChoice, int maxChoicesAmount, List<Runnable> choicesActions, String itemLocalePath, String turnedPath)
      Creates RadioButton with specified parameters.
      Parameters:
      material - Item's material
      name - Display name of item
      lore - Lore of item
      currentChoice - Current choice
      maxChoicesAmount - Limit of choices
      choicesActions - Runnables that are executing on choice change
      itemLocalePath - Path of item in localization file
      turnedPath - Path of 'turnedOn' 'turnedOff' messages
  • Method Details

    • getRadioButtonByItemStack

      public static RadioButton getRadioButtonByItemStack(org.bukkit.inventory.ItemStack itemStack)
    • updateItem

      public void updateItem()
    • getCurrentChoice

      public int getCurrentChoice()
    • onChoice

      public void onChoice()
    • getButtonItem

      public org.bukkit.inventory.ItemStack getButtonItem()