Class SpigotPlaceholderManager
java.lang.Object
com.guflimc.brick.placeholders.spigot.api.manager.SpigotPlaceholderManager
- All Implemented Interfaces:
PlaceholderManager<org.bukkit.entity.Player>
public class SpigotPlaceholderManager
extends Object
implements PlaceholderManager<org.bukkit.entity.Player>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(@NotNull PlaceholderModule<org.bukkit.entity.Player> module) Register a module that provides placeholders.net.kyori.adventure.text.Component
replace
(@NotNull String text, @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Replace placeholders.net.kyori.adventure.text.Component
replace
(@NotNull net.kyori.adventure.text.Component component, @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Replace placeholders.@Nullable net.kyori.adventure.text.Component
resolve
(@NotNull String placeholder, @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Resolve the placeholder replacement for the given context.void
unregister
(@NotNull PlaceholderModule<org.bukkit.entity.Player> module) Unregister a placeholder moduleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.guflimc.brick.placeholders.api.manager.PlaceholderManager
replace, replace, resolve
-
Constructor Details
-
SpigotPlaceholderManager
public SpigotPlaceholderManager(org.bukkit.plugin.java.JavaPlugin plugin)
-
-
Method Details
-
replace
public net.kyori.adventure.text.Component replace(@NotNull @NotNull net.kyori.adventure.text.Component component, @NotNull @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Description copied from interface:PlaceholderManager
Replace placeholders.- Specified by:
replace
in interfacePlaceholderManager<org.bukkit.entity.Player>
- Parameters:
component
- to replace placeholders in- Returns:
- the component with placeholders replaced
-
replace
public net.kyori.adventure.text.Component replace(@NotNull @NotNull String text, @NotNull @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Description copied from interface:PlaceholderManager
Replace placeholders.- Specified by:
replace
in interfacePlaceholderManager<org.bukkit.entity.Player>
- Parameters:
text
- to replace placeholders in- Returns:
- the component with placeholders replaced
-
resolve
@Nullable public @Nullable net.kyori.adventure.text.Component resolve(@NotNull @NotNull String placeholder, @NotNull @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Description copied from interface:PlaceholderManager
Resolve the placeholder replacement for the given context.- Specified by:
resolve
in interfacePlaceholderManager<org.bukkit.entity.Player>
- Returns:
- the replacement.
-
register
Description copied from interface:PlaceholderManager
Register a module that provides placeholders.- Specified by:
register
in interfacePlaceholderManager<org.bukkit.entity.Player>
- Parameters:
module
- the module to register
-
unregister
Description copied from interface:PlaceholderManager
Unregister a placeholder module- Specified by:
unregister
in interfacePlaceholderManager<org.bukkit.entity.Player>
- Parameters:
module
- the module to unregister.
-