All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.placeblock.betterinventories.builder.gui.CanvasGUIBuilder Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
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());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy