9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-28 11:29:15 +00:00

Counting the number of players across the entire network

This commit is contained in:
Daniel Zhang
2024-07-31 21:52:01 +08:00
parent 58efbc7960
commit 4f63e1bc06
4 changed files with 81 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ import net.momirealms.customfishing.common.plugin.feature.Reloadable;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.UUID;
/**
* Interface for managing fishing competitions.
@@ -84,4 +85,17 @@ public interface CompetitionManager extends Reloadable {
* @return a collection of competition IDs.
*/
Collection<String> getCompetitionIDs();
/**
* Count the online players.
*/
int onlinePlayerCountProvider();
/**
* Updates the player count for a specific UUID.
*
* @param uuid the UUID of the server.
* @param count the new player count.
*/
void updatePlayerCount(UUID uuid, int count);
}