Class ExtValueBuilder
java.lang.Object
com.djrapitops.plan.extension.implementation.builder.ExtValueBuilder
- All Implemented Interfaces:
ValueBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildBoolean
(boolean value) Build a Boolean.buildBoolean
(Supplier<Boolean> value) Lambda version for conditional return or throwingNotReadyException
.buildBooleanProvidingCondition
(boolean value, String providedCondition) Build a Boolean that provides a value forConditional
.buildBooleanProvidingCondition
(Supplier<Boolean> value, String providedCondition) Lambda version for conditional return or throwingNotReadyException
.buildComponent
(Component value) Build aComponent
.buildComponent
(Supplier<Component> value) Lambda version for conditional return or throwingNotReadyException
.buildDouble
(Double value) Build a Floating point number.buildDouble
(Supplier<Double> value) Lambda version for conditional return or throwingNotReadyException
.buildGroup
(String[] groups) Build a list of groups.buildGroup
(Supplier<String[]> groups) Lambda version for conditional return or throwingNotReadyException
.buildNumber
(Long value) Build a Number.buildNumber
(Supplier<Long> value) Lambda version for conditional return or throwingNotReadyException
.buildPercentage
(Double value) Build a Percentage.buildPercentage
(Supplier<Double> percentage) Lambda version for conditional return or throwingNotReadyException
.buildString
(String value) Build a String.buildString
(Supplier<String> value) Lambda version for conditional return or throwingNotReadyException
.buildTable
(Table table, Color tableColor) Build a table.buildTable
(Supplier<Table> table, Color tableColor) Lambda version for conditional return or throwingNotReadyException
.conditional
(Conditional conditional) Implementation detail - for abstracting annotations with the builder API.description
(String description) Description about the value that is shown on hover.format
(FormatType formatType) ValueBuilder.buildNumber(Long)
specific method, format the value withFormatType
static String
formatTextAsIdentifier
(String text) hideFromUsers
(BooleanProvider annotation) Implementation detail - for abstracting annotations with the builder API.Icon displayed next to the value.methodName
(ExtensionMethod method) Implementation detail - for abstracting annotations with the builder API.priority
(int priority) Display-priority of the value, highest value is placed top most.ValueBuilder.buildString(String)
specific method, link the value to a player page.Show this value in the players table.Show the value on a specific tab.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.djrapitops.plan.extension.builder.ValueBuilder
buildNumber, buildNumber, formatAsDateWithSeconds, formatAsDateWithYear, formatAsTimeAmount, icon, showAsPlayerPageLink, showInPlayerTable, showOnTab
-
Constructor Details
-
ExtValueBuilder
-
-
Method Details
-
formatTextAsIdentifier
-
methodName
Description copied from interface:ValueBuilder
Implementation detail - for abstracting annotations with the builder API.- Specified by:
methodName
in interfaceValueBuilder
- Parameters:
method
- Method this value is from.- Returns:
- This builder.
-
description
Description copied from interface:ValueBuilder
Description about the value that is shown on hover.- Specified by:
description
in interfaceValueBuilder
- Parameters:
description
- Describe what the value is about, maximum 150 characters.- Returns:
- This builder.
-
priority
Description copied from interface:ValueBuilder
Display-priority of the value, highest value is placed top most.Two values with same priority may appear in a random order.
- Specified by:
priority
in interfaceValueBuilder
- Parameters:
priority
- Priority between 0 andInteger.MAX_VALUE
.- Returns:
- This builder.
-
showInPlayerTable
Description copied from interface:ValueBuilder
Show this value in the players table.- Specified by:
showInPlayerTable
in interfaceValueBuilder
- Returns:
- This builder.
-
icon
Description copied from interface:ValueBuilder
Icon displayed next to the value.See https://fontawesome.com/icons (select 'free')) for icons
- Specified by:
icon
in interfaceValueBuilder
- Parameters:
icon
- Icon built using the methods inIcon
.- Returns:
- This builder.
-
showOnTab
Description copied from interface:ValueBuilder
Show the value on a specific tab.Remember to define
TabInfo
annotation.- Specified by:
showOnTab
in interfaceValueBuilder
- Parameters:
tabName
- Name of the tab.- Returns:
- This builder.
-
format
Description copied from interface:ValueBuilder
ValueBuilder.buildNumber(Long)
specific method, format the value withFormatType
- Specified by:
format
in interfaceValueBuilder
- Returns:
- This builder.
-
showAsPlayerPageLink
Description copied from interface:ValueBuilder
ValueBuilder.buildString(String)
specific method, link the value to a player page.- Specified by:
showAsPlayerPageLink
in interfaceValueBuilder
- Returns:
- This builder.
-
hideFromUsers
Description copied from interface:ValueBuilder
Implementation detail - for abstracting annotations with the builder API.- Specified by:
hideFromUsers
in interfaceValueBuilder
- Parameters:
annotation
- BooleanProvider annotation.- Returns:
- This builder.
-
conditional
Description copied from interface:ValueBuilder
Implementation detail - for abstracting annotations with the builder API.- Specified by:
conditional
in interfaceValueBuilder
- Parameters:
conditional
- Conditional annotation.- Returns:
- This builder.
-
buildBoolean
Description copied from interface:ValueBuilder
Build a Boolean. Displayed as "Yes/No" on the page.- Specified by:
buildBoolean
in interfaceValueBuilder
- Parameters:
value
- true/false- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildBooleanProvidingCondition
Description copied from interface:ValueBuilder
Build a Boolean that provides a value forConditional
. Displayed as "Yes/No" on the page.- Specified by:
buildBooleanProvidingCondition
in interfaceValueBuilder
- Parameters:
value
- true/false- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildString
Description copied from interface:ValueBuilder
Build a String.- Specified by:
buildString
in interfaceValueBuilder
- Parameters:
value
- any string. Limited to 50 characters.- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildComponent
Description copied from interface:ValueBuilder
Build aComponent
.- Specified by:
buildComponent
in interfaceValueBuilder
- Parameters:
value
- aComponent
made byComponentService
- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildNumber
Description copied from interface:ValueBuilder
Build a Number.- Specified by:
buildNumber
in interfaceValueBuilder
- Parameters:
value
- a non-floating point number.- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildDouble
Description copied from interface:ValueBuilder
Build a Floating point number.- Specified by:
buildDouble
in interfaceValueBuilder
- Parameters:
value
- a floating point number.- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildPercentage
Description copied from interface:ValueBuilder
Build a Percentage.- Specified by:
buildPercentage
in interfaceValueBuilder
- Parameters:
value
- value between 0.0 and 1.0- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildGroup
Description copied from interface:ValueBuilder
Build a list of groups.- Specified by:
buildGroup
in interfaceValueBuilder
- Parameters:
groups
- names of groups a player is in.- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildBoolean
Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.- Specified by:
buildBoolean
in interfaceValueBuilder
-
buildBooleanProvidingCondition
public DataValue<Boolean> buildBooleanProvidingCondition(Supplier<Boolean> value, String providedCondition) Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.ValueBuilder.buildBooleanProvidingCondition(boolean, String)
- Specified by:
buildBooleanProvidingCondition
in interfaceValueBuilder
-
buildString
Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.- Specified by:
buildString
in interfaceValueBuilder
-
buildComponent
Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.- Specified by:
buildComponent
in interfaceValueBuilder
-
buildNumber
Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.- Specified by:
buildNumber
in interfaceValueBuilder
-
buildDouble
Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.- Specified by:
buildDouble
in interfaceValueBuilder
-
buildPercentage
Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.- Specified by:
buildPercentage
in interfaceValueBuilder
-
buildGroup
Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.- Specified by:
buildGroup
in interfaceValueBuilder
-
buildTable
Description copied from interface:ValueBuilder
Build a table.- Specified by:
buildTable
in interfaceValueBuilder
- Parameters:
table
- Table built usingTable.builder()
tableColor
- Color of the table- Returns:
- a data value to give to
ExtensionDataBuilder
.
-
buildTable
Description copied from interface:ValueBuilder
Lambda version for conditional return or throwingNotReadyException
.- Specified by:
buildTable
in interfaceValueBuilder
-