Class Statistics
java.lang.Object
com.djrapitops.plan.extension.statistic.Statistics
Return value for
StatisticsProvider.
Stores key-number statistical data similar to Minecraft statistics.
Statistics can be grouped together by placing a : in the key, for example group:key1, group:key2
Player statistics will be automatically summed up into server-wide statistics.
Requires Capability DATA_EXTENSION_STATISTICS_API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Statisticscreate()The method Plan uses to get access to the data.booleanisEmpty()Place statistic in the object.Place statistics in the object.
-
Constructor Details
-
Statistics
public Statistics()
-
-
Method Details
-
create
-
put
Place statistic in the object.- Parameters:
key- String, with groups separated by :, e.g. "group_level_1:group_level_2:key"value- Statistical value.- Returns:
- This object.
-
putAll
Place statistics in the object.- Parameters:
statistics- String-Long map, with groups separated by :, e.g. "group_level_1:group_level_2:key"- Returns:
- This object.
- Throws:
IllegalArgumentException- if map contains null keys or values.
-
getValueByKey
-
isEmpty
public boolean isEmpty()
-