Class StringReplacerApplier


  • public final class StringReplacerApplier
    extends Object
    A utility class to apply StringReplacer
    • Field Detail

      • COLORIZE

        public static final StringReplacer COLORIZE
        A replacer to colorize the string
    • Method Detail

      • apply

        public static ItemBuilder apply​(ItemBuilder itemBuilder,
                                        boolean useGlobalVariableManager)
        Apply the string replacers to the item builder
        Parameters:
        itemBuilder - the item builder
        useGlobalVariableManager - whether to use the global variable manager
        Returns:
        the item builder
      • apply

        public static ItemBuilder apply​(ItemBuilder itemBuilder,
                                        Menu menu)
        Apply the string replacers to the item builder
        Parameters:
        itemBuilder - the item builder
        menu - the menu
        Returns:
        the item builder
      • apply

        public static ItemBuilder apply​(ItemBuilder itemBuilder,
                                        MenuElement menuElement)
        Apply the string replacers to the item builder
        Parameters:
        itemBuilder - the item builder
        menuElement - the menu element
        Returns:
        the item builder
      • replace

        public static String replace​(String string,
                                     UUID uuid,
                                     boolean useGlobalVariableManager)
        Apply the string replacers to the string
        Parameters:
        string - the string
        uuid - the unique id
        useGlobalVariableManager - whether to use the global variable manager
        Returns:
        the replaced string
      • replace

        public static String replace​(String string,
                                     UUID uuid,
                                     Menu menu)
        Apply the string replacers to the string
        Parameters:
        string - the string
        uuid - the unique id
        menu - the menu
        Returns:
        the replaced string
      • replace

        public static String replace​(String string,
                                     UUID uuid,
                                     MenuElement menuElement)
        Apply the string replacers to the string
        Parameters:
        string - the string
        uuid - the unique id
        menuElement - the menu element
        Returns:
        the replaced string