dev.aurelium.slate.info.ComponentPlaceholderInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of slate Show documentation
Show all versions of slate Show documentation
API for building user-configurable GUI menus
The newest version!
package dev.aurelium.slate.info;
import dev.aurelium.slate.Slate;
import dev.aurelium.slate.component.ComponentData;
import dev.aurelium.slate.item.provider.PlaceholderData;
import dev.aurelium.slate.menu.ActiveMenu;
import org.bukkit.entity.Player;
/**
* Represents contextual information about a placeholder in a menu within a component.
*
* @param the linked template context object type
*/
public class ComponentPlaceholderInfo extends TemplatePlaceholderInfo {
private final ComponentData component;
public ComponentPlaceholderInfo(Slate slate, Player player, String placeholder, ActiveMenu menu, PlaceholderData data, ComponentData component, T value) {
super(slate, player, placeholder, menu, data, value);
this.component = component;
}
/**
* Gets the component data of the component containing the placeholder, which contains
* information about this instance.
*
* @return the component data
*/
public ComponentData component() {
return component;
}
}