Interface PlaceholderItem<T>
- Type Parameters:
T- type of object needed to get data for placeholder.
public interface PlaceholderItem<T>
Represent single placeholder item, like "name" in player.name placeholder.
-
Method Summary
Modifier and TypeMethodDescriptionGet data for this placeholder item as String or BaseComponent, like player.name should return here name of given player.Gets the full id of the item.getId()Returns id/name of placeholder item, like that "name" in player.name.getType()Returns type of placeholder item, like that "player" in player.name.
-
Method Details
-
getType
PlaceholderType<T> getType()Returns type of placeholder item, like that "player" in player.name.- Returns:
- type of placeholder.
-
getId
String getId()Returns id/name of placeholder item, like that "name" in player.name.- Returns:
- id of placeholder item.
-
apply
Get data for this placeholder item as String or BaseComponent, like player.name should return here name of given player.
If method return other object than String or BaseComponent it will be changed to string byObject.toString()method.- Parameters:
obj- object to fetch the data needed for placeholder.args- arguments of item- Returns:
- String of BaseComponent to use instead of placeholder.
-
getFullId
String getFullId()Gets the full id of the item.- Returns:
- String representing the full id.
-