Package com.ranull.graves.integration
Class PlaceholderAPI
java.lang.Object
me.clip.placeholderapi.PlaceholderHook
me.clip.placeholderapi.expansion.PlaceholderExpansion
com.ranull.graves.integration.PlaceholderAPI
- All Implemented Interfaces:
me.clip.placeholderapi.expansion.Relational
public final class PlaceholderAPI
extends me.clip.placeholderapi.expansion.PlaceholderExpansion
implements me.clip.placeholderapi.expansion.Relational
Integration class for PlaceholderAPI to provide custom placeholders for the Graves plugin.
Extends PlaceholderExpansion and implements Relational for placeholder handling.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlaceholderAPI
(Graves plugin) Constructs a new PlaceholderAPI instance with the specified Graves plugin. -
Method Summary
Modifier and TypeMethodDescriptionboolean
@NotNull String
@NotNull String
private String
getOwnerDetail
(UUID uuid, Function<Grave, String> function) @NotNull String
Initializes the placeholder handlers.onPlaceholderRequest
(org.bukkit.entity.Player player, @NotNull String identifier) Handles placeholder requests for the Graves plugin.onPlaceholderRequest
(org.bukkit.entity.Player playerOne, org.bukkit.entity.Player playerTwo, String identifier) Handles relational placeholder requests (not yet implemented).boolean
persist()
Methods inherited from class me.clip.placeholderapi.expansion.PlaceholderExpansion
configurationContains, equals, get, getBoolean, getConfigSection, getConfigSection, getDescription, getDouble, getInt, getLink, getLong, getName, getPlaceholderAPI, getPlaceholders, getPlugin, getRequiredPlugin, getString, getStringList, isRegistered, register, toString, unregister
Methods inherited from class me.clip.placeholderapi.PlaceholderHook
onRequest
-
Field Details
-
plugin
-
placeholderHandlers
-
-
Constructor Details
-
PlaceholderAPI
Constructs a new PlaceholderAPI instance with the specified Graves plugin.- Parameters:
plugin
- The main Graves plugin instance.
-
-
Method Details
-
persist
public boolean persist()- Overrides:
persist
in classme.clip.placeholderapi.expansion.PlaceholderExpansion
-
canRegister
public boolean canRegister()- Overrides:
canRegister
in classme.clip.placeholderapi.expansion.PlaceholderExpansion
-
getAuthor
- Specified by:
getAuthor
in classme.clip.placeholderapi.expansion.PlaceholderExpansion
-
getIdentifier
- Specified by:
getIdentifier
in classme.clip.placeholderapi.expansion.PlaceholderExpansion
-
getVersion
- Specified by:
getVersion
in classme.clip.placeholderapi.expansion.PlaceholderExpansion
-
onPlaceholderRequest
public String onPlaceholderRequest(org.bukkit.entity.Player player, @NotNull @NotNull String identifier) Handles placeholder requests for the Graves plugin.- Overrides:
onPlaceholderRequest
in classme.clip.placeholderapi.PlaceholderHook
- Parameters:
player
- The player requesting the placeholder (may be null).identifier
- The identifier of the placeholder.- Returns:
- The value of the placeholder, or an empty string if not applicable.
-
onPlaceholderRequest
public String onPlaceholderRequest(org.bukkit.entity.Player playerOne, org.bukkit.entity.Player playerTwo, String identifier) Handles relational placeholder requests (not yet implemented).- Specified by:
onPlaceholderRequest
in interfaceme.clip.placeholderapi.expansion.Relational
- Parameters:
playerOne
- The first player.playerTwo
- The second player.identifier
- The identifier of the placeholder.- Returns:
- The value of the placeholder, or null if not implemented.
-
initializePlaceholderHandlers
Initializes the placeholder handlers.- Returns:
- A map of placeholder handlers.
-
getOwnerDetail
-