Interface ValueBuilder

    • Method Detail

      • description

        ValueBuilder description​(java.lang.String description)
        Description about the value that is shown on hover.
        Parameters:
        description - Describe what the value is about, maximum 150 characters.
        Returns:
        This builder.
      • priority

        ValueBuilder priority​(int priority)
        Display-priority of the value, highest value is placed top most.

        Two values with same priority may appear in a random order.

        Parameters:
        priority - Priority between 0 and Integer.MAX_VALUE.
        Returns:
        This builder.
      • showInPlayerTable

        ValueBuilder showInPlayerTable()
        Show this value in the players table.
        Returns:
        This builder.
      • icon

        default ValueBuilder icon​(java.lang.String iconName,
                                  Family iconFamily,
                                  Color iconColor)
        Icon displayed next to the value.

        See https://fontawesome.com/icons (select 'free')) for icons

        Parameters:
        iconName - Name of the icon
        iconFamily - Family of the icon
        iconColor - Color of the icon
        Returns:
        This builder.
      • icon

        ValueBuilder icon​(Icon icon)
        Icon displayed next to the value.

        See https://fontawesome.com/icons (select 'free')) for icons

        Parameters:
        icon - Icon built using the methods in Icon.
        Returns:
        This builder.
      • showOnTab

        ValueBuilder showOnTab​(java.lang.String tabName)
        Show the value on a specific tab.

        Remember to define TabInfo annotation.

        Parameters:
        tabName - Name of the tab.
        Returns:
        This builder.
      • formatAsDateWithYear

        default ValueBuilder formatAsDateWithYear()
        buildNumber(long) specific method, format the value as a epoch ms timestamp.
        Returns:
        This builder.
      • formatAsDateWithSeconds

        default ValueBuilder formatAsDateWithSeconds()
        buildNumber(long) specific method, format the value as a epoch ms timestamp.
        Returns:
        This builder.
      • formatAsTimeAmount

        default ValueBuilder formatAsTimeAmount()
        buildNumber(long) specific method, format the value as milliseconds of time.
        Returns:
        This builder.
      • buildBoolean

        DataValue<java.lang.Boolean> buildBoolean​(boolean value)
        Build a Boolean. Displayed as "Yes/No" on the page.
        Parameters:
        value - true/false
        Returns:
        a data value to give to ExtensionDataBuilder.
      • buildBooleanProvidingCondition

        DataValue<java.lang.Boolean> buildBooleanProvidingCondition​(boolean value,
                                                                    java.lang.String providedCondition)
        Build a Boolean that provides a value for Conditional. Displayed as "Yes/No" on the page.
        Parameters:
        value - true/false
        Returns:
        a data value to give to ExtensionDataBuilder.
      • buildString

        DataValue<java.lang.String> buildString​(java.lang.String value)
        Build a String.
        Parameters:
        value - any string. Limited to 50 characters.
        Returns:
        a data value to give to ExtensionDataBuilder.
      • buildNumber

        DataValue<java.lang.Long> buildNumber​(long value)
        Build a Number.
        Parameters:
        value - a non-floating point number.
        Returns:
        a data value to give to ExtensionDataBuilder.
      • buildDouble

        DataValue<java.lang.Double> buildDouble​(double value)
        Build a Floating point number.
        Parameters:
        value - a floating point number.
        Returns:
        a data value to give to ExtensionDataBuilder.
      • buildPercentage

        DataValue<java.lang.Double> buildPercentage​(double percentage)
        Build a Percentage.
        Parameters:
        percentage - value between 0.0 and 1.0
        Returns:
        a data value to give to ExtensionDataBuilder.
      • buildGroup

        DataValue<java.lang.String[]> buildGroup​(java.lang.String[] groups)
        Build a list of groups.
        Parameters:
        groups - names of groups a player is in.
        Returns:
        a data value to give to ExtensionDataBuilder.
      • hideFromUsers

        ValueBuilder hideFromUsers​(BooleanProvider annotation)
        Implementation detail - for abstracting annotations with the builder API.
        Parameters:
        annotation - BooleanProvider annotation.
        Returns:
        This builder.
      • conditional

        ValueBuilder conditional​(Conditional conditional)
        Implementation detail - for abstracting annotations with the builder API.
        Parameters:
        conditional - Conditional annotation.
        Returns:
        This builder.
      • showAsPlayerPageLink

        default ValueBuilder showAsPlayerPageLink​(StringProvider annotation)
        Implementation detail - for abstracting annotations with the builder API.
        Parameters:
        annotation - StringProvider annotation.
        Returns:
        This builder.
      • methodName

        ValueBuilder methodName​(ExtensionMethod method)
        Implementation detail - for abstracting annotations with the builder API.
        Parameters:
        method - Method this value is from.
        Returns:
        This builder.
      • showInPlayerTable

        default ValueBuilder showInPlayerTable​(boolean show)
        Implementation detail - for abstracting annotations with the builder API.
        Parameters:
        show - true/false
        Returns:
        This builder.
      • showOnTab

        default ValueBuilder showOnTab​(Tab annotation)
        Implementation detail - for abstracting annotations with the builder API.
        Parameters:
        annotation - Tab annotation.
        Returns:
        This builder.