Class Replacement

java.lang.Object
de.eldoria.eldoutilities.messages.Replacement

public final class Replacement extends Object
A replacement represents a text placeholder and its replacement.
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    create(String key, Double value)
     
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    create(String key, Enum<?> anEnum)
    Creates a new replacement.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    create(String key, Float value)
     
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    create(String key, Object value)
    Creates a new replacement.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    create(String key, String value)
    Creates a new replacement.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    create(String key, Player player)
    Creates a new replacement for a player.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    create(String key, World world)
    Creates a new replacement for a player.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    name(String key, Enum<?> anEnum)
    Creates a new replacement.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    number(String key, Double value)
     
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    number(String key, Float value)
     
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    player(String key, Player player)
    Creates a new replacement for a player.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    replacement(String key, Object value)
    Creates a new replacement.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    replacement(String key, String value)
    Creates a new replacement.
    static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
    world(String key, World world)
    Creates a new replacement for a player.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver create(String key, String value)
      Creates a new replacement.
      Parameters:
      key - key of replacement
      value - value for replacement
      Returns:
      replacement with registered replacement
    • replacement

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver replacement(String key, String value)
      Creates a new replacement.
      Parameters:
      key - key of replacement
      value - value for replacement
      Returns:
      replacement with registered replacement
    • create

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver create(String key, Object value)
      Creates a new replacement.
      Parameters:
      key - key of replacement
      value - value for replacement
      Returns:
      replacement with registered replacement
    • replacement

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver replacement(String key, Object value)
      Creates a new replacement.
      Parameters:
      key - key of replacement
      value - value for replacement
      Returns:
      replacement with registered replacement
    • create

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver create(String key, Double value)
    • create

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver create(String key, Float value)
    • number

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver number(String key, Double value)
    • number

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver number(String key, Float value)
    • create

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver create(String key, Enum<?> anEnum)
      Creates a new replacement.
      Parameters:
      key - key of replacement
      anEnum - value which provides a string via Enum.name()
      Returns:
      replacement with registered replacement
    • name

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver name(String key, Enum<?> anEnum)
      Creates a new replacement.
      Parameters:
      key - key of replacement
      anEnum - value which provides a string via Enum.name()
      Returns:
      replacement with registered replacement
    • create

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver create(String key, Player player)
      Creates a new replacement for a player.
      Parameters:
      key - key of replacement
      player - value which provides the name of the player
      Returns:
      replacement with registered replacement
    • player

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver player(String key, Player player)
      Creates a new replacement for a player.
      Parameters:
      key - key of replacement
      player - value which provides the name of the player
      Returns:
      replacement with registered replacement
    • create

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver create(String key, World world)
      Creates a new replacement for a player.
      Parameters:
      key - key of replacement
      world - world which provides the name of the world
      Returns:
      replacement with registered replacement
    • world

      public static net.kyori.adventure.text.minimessage.tag.resolver.TagResolver world(String key, World world)
      Creates a new replacement for a player.
      Parameters:
      key - key of replacement
      world - world which provides the name of the world
      Returns:
      replacement with registered replacement