de.placeblock.betterinventories.builder.gui.CanvasGUIBuilder 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.gui;
import de.placeblock.betterinventories.content.pane.impl.simple.SimpleGUIPane;
import de.placeblock.betterinventories.gui.impl.CanvasGUI;
import org.bukkit.plugin.Plugin;
/**
* Builder for creating CanvasGUIs
*/
@SuppressWarnings("unused")
public class CanvasGUIBuilder extends BaseCanvasGUIBuilder {
/**
* Creates a new CanvasGUIBuilder
* @param plugin The plugin for the GUI
*/
public CanvasGUIBuilder(Plugin plugin) {
super(plugin);
}
/**
* Builds the CanvasGUI
* @return The new CanvasGUI
*/
@Override
public CanvasGUI build() {
if (this.height != null) {
return new CanvasGUI(this.getPlugin(), this.getTitle(), this.getHeight());
} else {
return new CanvasGUI(this.getPlugin(), this.getTitle(), this.getType());
}
}
}