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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregister(@NotNull PlaceholderModule<org.bukkit.entity.Player> module) Register a module that provides placeholders.net.kyori.adventure.text.Componentreplace(@NotNull String text, @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Replace placeholders.net.kyori.adventure.text.Componentreplace(@NotNull net.kyori.adventure.text.Component component, @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Replace placeholders.@Nullable net.kyori.adventure.text.Componentresolve(@NotNull String placeholder, @NotNull PlaceholderResolveContext<org.bukkit.entity.Player> context) Resolve the placeholder replacement for the given context.voidunregister(@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, waitMethods 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:PlaceholderManagerReplace placeholders.- Specified by:
replacein 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:PlaceholderManagerReplace placeholders.- Specified by:
replacein 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:PlaceholderManagerResolve the placeholder replacement for the given context.- Specified by:
resolvein interfacePlaceholderManager<org.bukkit.entity.Player>- Returns:
- the replacement.
-
register
Description copied from interface:PlaceholderManagerRegister a module that provides placeholders.- Specified by:
registerin interfacePlaceholderManager<org.bukkit.entity.Player>- Parameters:
module- the module to register
-
unregister
Description copied from interface:PlaceholderManagerUnregister a placeholder module- Specified by:
unregisterin interfacePlaceholderManager<org.bukkit.entity.Player>- Parameters:
module- the module to unregister.
-