allow getting AdaptedPlayer via UUID

This commit is contained in:
ajgeiss0702
2021-08-25 14:01:32 -07:00
parent 72e5c86629
commit 853d8861e8
3 changed files with 45 additions and 9 deletions
@@ -6,6 +6,7 @@ import us.ajg0702.queue.api.players.AdaptedPlayer;
import us.ajg0702.queue.api.server.AdaptedServer;
import java.util.List;
import java.util.UUID;
public interface PlatformMethods {
@@ -29,10 +30,31 @@ public interface PlatformMethods {
List<AdaptedPlayer> getOnlinePlayers();
List<String> getPlayerNames(boolean lowercase);
/**
* Gets an online player by their name
* @param name The players name
* @return The AdaptedPlayer for this player
*/
AdaptedPlayer getPlayer(String name);
/**
* Gets an online player by their UUID
* @param uuid their UUID
* @return the AdaptedPlayer for this player
*/
AdaptedPlayer getPlayer(UUID uuid);
/**
* Gets a list of the server names
* @return A list of the server names
*/
List<String> getServerNames();
/**
* Gets the name of the implementation. E.g. bungeecord, velocity
* @return the name of the implementation
*/
String getImplementationName();
List<IBaseCommand> getCommands();
@@ -44,6 +66,11 @@ public interface PlatformMethods {
*/
boolean hasPlugin(String pluginName);
/**
* Gets an AdaptedServer from the server name
* @param name The name of the server
* @return The AdaptedServer
*/
AdaptedServer getServer(String name);
List<AdaptedServer> getServers();