Created
June 27, 2014 08:53
-
-
Save anonymous/3173707c7ee8135269e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.bukkit.inventory.ItemStack; | |
public class MenuItem | |
{ | |
private Menu menu; | |
private ItemStack icon; | |
private boolean closeMenuOnSelection; | |
private IMenuItemClickHandler clickHandler; | |
public MenuItem(ItemStack icon, boolean closeMenuOnSelection) | |
{ | |
this.icon = icon; | |
this.closeMenuOnSelection = closeMenuOnSelection; | |
} | |
public MenuItem(ItemStack icon) | |
{ | |
this(icon, false); | |
} | |
public Menu getMenu() | |
{ | |
return menu; | |
} | |
public ItemStack getIcon() | |
{ | |
return icon; | |
} | |
public IMenuItemClickHandler getClickHandler() | |
{ | |
return clickHandler; | |
} | |
public void setMenu(Menu menu) | |
{ | |
this.menu = menu; | |
} | |
public void setIcon(ItemStack icon) | |
{ | |
this.icon = icon; | |
} | |
public void setClickHandler(IMenuItemClickHandler handler) | |
{ | |
this.clickHandler = handler; | |
} | |
public void setCloseOnSelection(boolean bool) | |
{ | |
this.closeMenuOnSelection = bool; | |
} | |
public boolean shouldCloseMenuOnSelection() | |
{ | |
return closeMenuOnSelection; | |
} | |
public boolean hasClickHandler() | |
{ | |
return clickHandler != null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment