de.placeblock.betterinventories.builder.content.BaseGUIItemBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BetterInventories Show documentation
Show all versions of BetterInventories Show documentation
Easy to use and extensive InventoryAPI for Spigot
package de.placeblock.betterinventories.builder.content;
import de.placeblock.betterinventories.content.item.GUIItem;
import de.placeblock.betterinventories.gui.GUI;
import org.bukkit.inventory.ItemStack;
/**
* Base class for creating GUIITem-Builders
* @param The GUIItem type
* @param The Builder type
*/
@SuppressWarnings("unchecked")
public abstract class BaseGUIItemBuilder> extends BaseGUISectionBuilder {
/**
* The ItemStack of the GUIItem
*/
private ItemStack item;
/**
* Creates a new BaseGUIItemBuilder
* @param gui The GUI for the Item
*/
public BaseGUIItemBuilder(GUI gui) {
super(gui);
}
/**
* Sets the ItemStack of the GUIItem
* @param item The ItemStack
* @return this
*/
public B item(ItemStack item) {
this.item = item;
return (B) this;
}
/**
* @return The ItemStack of the GUIItem
*/
protected ItemStack getItem() {
return this.getValue(this.item);
}
}