PlayerStats/src/main/java/com/github/artemis/the/gr8/playerstats/api/StatManager.java

41 lines
1.8 KiB
Java
Raw Normal View History

package com.github.artemis.the.gr8.playerstats.api;
2022-08-08 00:54:18 +02:00
import com.github.artemis.the.gr8.playerstats.statistic.request.StatRequest;
2022-08-08 00:54:18 +02:00
import java.util.LinkedHashMap;
/**
* 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.
* 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.
* 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
* 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
* 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*/
RequestGenerator<LinkedHashMap<String, Integer>> totalTopStatRequest();
}