Class RadioButton
java.lang.Object
ua.mcchickenstudio.opencreative.menus.buttons.RadioButton
RadioButton
This class represents RadioButton that has multiple choices and actions for changing current choice.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackintstatic RadioButtongetRadioButtonByItemStack(org.bukkit.inventory.ItemStack itemStack) voidonChoice()void
-
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 materialname- Display name of itemlore- Lore of itemcurrentChoice- Current choicemaxChoicesAmount- Limit of choiceschoicesActions- Runnables that are executing on choice changeitemLocalePath- Path of item in localization fileturnedPath- Path of 'turnedOn' 'turnedOff' messages
-
-
Method Details
-
getRadioButtonByItemStack
-
updateItem
public void updateItem() -
getCurrentChoice
public int getCurrentChoice() -
onChoice
public void onChoice() -
getButtonItem
public org.bukkit.inventory.ItemStack getButtonItem()
-