de.placeblock.betterinventories.builder.content.BaseGUISectionBuilder 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.builder.Builder;
import de.placeblock.betterinventories.content.GUISection;
import de.placeblock.betterinventories.gui.GUI;
import de.placeblock.betterinventories.util.Vector2d;
import lombok.RequiredArgsConstructor;
/**
* Base class for creating GUISection-Builders
* @param The GUISection type
* @param The Builder type
*/
@SuppressWarnings({"unchecked", "unused"})
@RequiredArgsConstructor
public abstract class BaseGUISectionBuilder> implements Builder {
/**
* The GUI this Sections belongs to
*/
private final GUI gui;
/**
* The size of this section
*/
private Vector2d size;
/**
* Sets the size of the {@link GUISection}.
* Not needed in many implementations.
* @param size The size
* @return this
*/
public B size(Vector2d size) {
this.size = size;
return (B) this;
}
/**
* @return The size of the Section
*/
protected Vector2d getSize() {
return this.size;
}
/**
* @return The GUI for this Section
*/
protected GUI getGui() {
return this.gui;
}
}