2022-08-15 22:40:54 +02:00
|
|
|
package com.github.artemis.the.gr8.playerstats.api;
|
2022-08-08 00:54:18 +02:00
|
|
|
|
2022-08-16 17:14:22 +02:00
|
|
|
import com.github.artemis.the.gr8.playerstats.statistic.request.StatRequest;
|
2022-08-08 00:54:18 +02:00
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
|
2022-08-16 17:14:22 +02:00
|
|
|
/**
|
|
|
|
* Turns user input into a {@link StatRequest} that can be used to get statistic data
|
|
|
|
*/
|
2022-08-08 00:54:18 +02:00
|
|
|
public interface StatManager {
|
|
|
|
|
2022-08-08 17:24:22 +02:00
|
|
|
/** Gets a RequestGenerator that can be used to create a PlayerStatRequest.
|
2022-08-16 15:16:57 +02:00
|
|
|
* This RequestGenerator will make sure all default settings
|
|
|
|
* for a player-statistic-lookup are configured.
|
|
|
|
*
|
|
|
|
* @param playerName the player whose statistic is being requested
|
|
|
|
* @return the RequestGenerator */
|
2022-08-08 17:24:22 +02:00
|
|
|
RequestGenerator<Integer> playerStatRequest(String playerName);
|
2022-08-08 00:54:18 +02:00
|
|
|
|
2022-08-08 17:24:22 +02:00
|
|
|
/** Gets a RequestGenerator that can be used to create a ServerStatRequest.
|
2022-08-16 15:16:57 +02:00
|
|
|
* This RequestGenerator will make sure all default settings
|
|
|
|
* for a server-statistic-lookup are configured.
|
|
|
|
*
|
|
|
|
* @return the RequestGenerator*/
|
2022-08-08 17:24:22 +02:00
|
|
|
RequestGenerator<Long> serverStatRequest();
|
2022-08-08 00:54:18 +02:00
|
|
|
|
2022-08-08 17:24:22 +02:00
|
|
|
/** Gets a RequestGenerator that can be used to create a TopStatRequest
|
2022-08-16 15:16:57 +02:00
|
|
|
* for a top-list of the specified size. This RequestGenerator will
|
|
|
|
* make sure all default settings for a top-statistic-lookup are configured.
|
|
|
|
*
|
|
|
|
* @param topListSize how big the top-x should be (10 by default)
|
|
|
|
* @return the RequestGenerator*/
|
2022-08-08 17:24:22 +02:00
|
|
|
RequestGenerator<LinkedHashMap<String, Integer>> topStatRequest(int topListSize);
|
2022-08-08 00:54:18 +02:00
|
|
|
|
2022-08-08 17:24:22 +02:00
|
|
|
/** Gets a RequestGenerator that can be used to create a TopStatRequest
|
2022-08-16 15:16:57 +02:00
|
|
|
* for all offline players on the server (those that are included by
|
|
|
|
* PlayerStats' settings). This RequestGenerator will make sure
|
|
|
|
* all default settings for a top-statistic-lookup are configured.
|
|
|
|
*
|
|
|
|
* @return the RequestGenerator*/
|
2022-08-09 21:02:19 +02:00
|
|
|
RequestGenerator<LinkedHashMap<String, Integer>> totalTopStatRequest();
|
2022-08-16 17:14:22 +02:00
|
|
|
}
|