PlayerStats/src/main/java/com/artemis/the/gr8/playerstats/core/statrequest/ServerStatRequest.java

46 lines
1.3 KiB
Java

package com.artemis.the.gr8.playerstats.core.statrequest;
import com.artemis.the.gr8.playerstats.api.RequestGenerator;
import com.artemis.the.gr8.playerstats.api.StatRequest;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Statistic;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.jetbrains.annotations.NotNull;
public final class ServerStatRequest extends StatRequest<Long> implements RequestGenerator<Long> {
public ServerStatRequest() {
this(Bukkit.getConsoleSender());
}
public ServerStatRequest(CommandSender sender) {
super(sender);
super.configureForServer();
}
@Override
public boolean isValid() {
return super.hasMatchingSubStat();
}
@Override
public StatRequest<Long> untyped(@NotNull Statistic statistic) {
super.configureUntyped(statistic);
return this;
}
@Override
public StatRequest<Long> blockOrItemType(@NotNull Statistic statistic, @NotNull Material material) {
super.configureBlockOrItemType(statistic, material);
return this;
}
@Override
public StatRequest<Long> entityType(@NotNull Statistic statistic, @NotNull EntityType entityType) {
super.configureEntityType(statistic, entityType);
return this;
}
}