mirror of
https://github.com/itHotL/PlayerStats.git
synced 2024-11-21 11:47:03 +01:00
Added method to API to check whether a player is on the exclude-list
This commit is contained in:
parent
18ac4ecf00
commit
18bf8a56a7
@ -107,7 +107,7 @@
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<phase>deploy</phase>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
@ -120,7 +120,7 @@
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>deploy</phase>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
@ -133,7 +133,7 @@
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<phase>deploy</phase>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
|
@ -4,6 +4,16 @@ import java.util.LinkedHashMap;
|
||||
|
||||
public interface StatManager {
|
||||
|
||||
/** Checks if the player belonging to this name
|
||||
* is on PlayerStats' exclude-list (meaning this
|
||||
* player is not counted for the server total, and
|
||||
* does not show in top results).
|
||||
*
|
||||
* @param playerName the name of the player to check
|
||||
* @return true if this player is on the exclude-list
|
||||
*/
|
||||
boolean isExcludedPlayer(String playerName);
|
||||
|
||||
/** 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.
|
||||
|
@ -25,7 +25,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Turns user input into a {@link StatRequest} that can be
|
||||
* used to get statistic data.
|
||||
* executed to get statistic data.
|
||||
*/
|
||||
public final class RequestManager implements StatManager {
|
||||
|
||||
@ -45,6 +45,11 @@ public final class RequestManager implements StatManager {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExcludedPlayer(String playerName) {
|
||||
return offlinePlayerHandler.isExcludedPlayer(playerName);
|
||||
}
|
||||
|
||||
@Contract("_ -> new")
|
||||
@Override
|
||||
public @NotNull RequestGenerator<Integer> createPlayerStatRequest(String playerName) {
|
||||
|
Loading…
Reference in New Issue
Block a user