Class StaticPlaceholdersService<T,P extends Placeholders<T,P>>

java.lang.Object
net.dzikoysk.funnyguilds.feature.placeholders.StaticPlaceholdersService<T,P>
All Implemented Interfaces:
PlaceholdersService<T>
Direct Known Subclasses:
BasicPlaceholdersService, GuildPlaceholdersService, TimePlaceholdersService, UserPlaceholdersService

public abstract class StaticPlaceholdersService<T,P extends Placeholders<T,P>> extends Object implements PlaceholdersService<T>
  • Field Details

  • Constructor Details

    • StaticPlaceholdersService

      public StaticPlaceholdersService()
  • Method Details

    • register

      public void register(org.bukkit.plugin.java.JavaPlugin plugin, String name, P placeholders)
      Register placeholders set.
      Parameters:
      plugin - plugin which register placeholders set
      name - name of placeholders set
      placeholders - placeholders set
    • format

      public String format(@Nullable @Nullable Object entity, String text, T data)
      Format text with all placeholders.
      Specified by:
      format in interface PlaceholdersService<T>
      Parameters:
      text - text to format
      data - data to use to formatting
      Returns:
      formatted text
    • formatCustom

      public String formatCustom(@Nullable @Nullable Object entity, @Nullable @Nullable String text, T data, String prefix, String suffix, Function<String,String> nameModifier)
    • formatCustom

      public String formatCustom(@Nullable @Nullable String text, T data, String prefix, String suffix, Function<String,String> nameModifier)
    • prepareReplacements

      public Set<FunnyFormatter> prepareReplacements(@Nullable @Nullable Object entity, T data)