mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
'showInPlayerTable' parameter for Providers
for BooleanProvider, DoubleProvider, PercentageProvider, NumberProvider, StringProvider annotations. When the parameter is set to 'true' the value from the Provider is shown on a table alongside players. Capability DATA_EXTENSION_SHOW_IN_PLAYER_TABLE added
This commit is contained in:
parent
6d788ba61a
commit
45da64e88f
@ -42,9 +42,15 @@ enum Capability {
|
||||
*/
|
||||
DATA_EXTENSION_TABLES,
|
||||
/**
|
||||
* DataExtension API
|
||||
* DataExtension API addition, allows throwing {@link com.djrapitops.plan.extension.NotReadyException} inside a Provider method when your API is not ready for a method call.
|
||||
*/
|
||||
DATA_EXTENSION_NOT_READY_EXCEPTION;
|
||||
DATA_EXTENSION_NOT_READY_EXCEPTION,
|
||||
/**
|
||||
* DataExtension API addition, parameter {@code showInPlayerTable} for BooleanProvider, DoubleProvider, PercentageProvider, NumberProvider, StringProvider annotations.
|
||||
* <p>
|
||||
* When the parameter is set to {@code true} the value from this Provider is shown on a table alongside players.
|
||||
*/
|
||||
DATA_EXTENSION_SHOW_IN_PLAYER_TABLE;
|
||||
|
||||
static Optional<Capability> getByName(String name) {
|
||||
if (name == null) {
|
||||
|
@ -112,4 +112,13 @@ public @interface BooleanProvider {
|
||||
* @return Preferred color. If none are specified defaults are used.
|
||||
*/
|
||||
Color iconColor() default Color.NONE;
|
||||
|
||||
/**
|
||||
* When the parameter is set to {@code true} the value from this Provider is shown on a table alongside players.
|
||||
* <p>
|
||||
* If {@link BooleanProvider#hidden()} is {@code true} then this value will not be shown in the table regardless of the value of this parameter.
|
||||
*
|
||||
* @return false by default.
|
||||
*/
|
||||
boolean showInPlayerTable() default false;
|
||||
}
|
@ -91,4 +91,10 @@ public @interface DoubleProvider {
|
||||
*/
|
||||
Color iconColor() default Color.NONE;
|
||||
|
||||
/**
|
||||
* When the parameter is set to {@code true} the value from this Provider is shown on a table alongside players.
|
||||
*
|
||||
* @return false by default.
|
||||
*/
|
||||
boolean showInPlayerTable() default false;
|
||||
}
|
||||
|
@ -103,4 +103,10 @@ public @interface NumberProvider {
|
||||
*/
|
||||
Color iconColor() default Color.NONE;
|
||||
|
||||
/**
|
||||
* When the parameter is set to {@code true} the value from this Provider is shown on a table alongside players.
|
||||
*
|
||||
* @return false by default.
|
||||
*/
|
||||
boolean showInPlayerTable() default false;
|
||||
}
|
||||
|
@ -94,4 +94,10 @@ public @interface PercentageProvider {
|
||||
*/
|
||||
Color iconColor() default Color.NONE;
|
||||
|
||||
/**
|
||||
* When the parameter is set to {@code true} the value from this Provider is shown on a table alongside players.
|
||||
*
|
||||
* @return false by default.
|
||||
*/
|
||||
boolean showInPlayerTable() default false;
|
||||
}
|
||||
|
@ -103,4 +103,10 @@ public @interface StringProvider {
|
||||
*/
|
||||
Color iconColor() default Color.NONE;
|
||||
|
||||
/**
|
||||
* When the parameter is set to {@code true} the value from this Provider is shown on a table alongside players.
|
||||
*
|
||||
* @return false by default.
|
||||
*/
|
||||
boolean showInPlayerTable() default false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user