Package us.ajg0702.queue.api
Interface PlatformMethods
public interface PlatformMethods
-
Method Summary
Modifier and TypeMethodDescriptionGets the name of the implementation.Gets an online player by their nameGets an online player by their UUIDgetPlayerNames(boolean lowercase) getProtocolName(int protocol) Gets an AdaptedServer from the server nameGets a list of the server namesList<? extends AdaptedServer>booleanChecks if a plugin is installedsenderToPlayer(ICommandSender sender) Converts a command sender to an AdaptedPlayervoidsendPluginMessage(AdaptedPlayer player, String channel, String... data) Sends a plugin message on the plugin messaging channel
-
Method Details
-
sendPluginMessage
Sends a plugin message on the plugin messaging channel- Parameters:
player- The player to send the message throughchannel- The (sub)channeldata- The data
-
senderToPlayer
Converts a command sender to an AdaptedPlayer- Parameters:
sender- the commandsender- Returns:
- the AdaptedPlayer
-
getPluginVersion
String getPluginVersion() -
getOnlinePlayers
List<AdaptedPlayer> getOnlinePlayers() -
getPlayerNames
-
getPlayer
Gets an online player by their name- Parameters:
name- The players name- Returns:
- The AdaptedPlayer for this player
-
getPlayer
Gets an online player by their UUID- Parameters:
uuid- their UUID- Returns:
- the AdaptedPlayer for this player
-
getServerNames
Gets a list of the server names- Returns:
- A list of the server names
-
getImplementationName
String getImplementationName()Gets the name of the implementation. E.g. bungeecord, velocity- Returns:
- the name of the implementation
-
getCommands
List<IBaseCommand> getCommands() -
hasPlugin
Checks if a plugin is installed- Parameters:
pluginName- The name of the plugin to check for (case in-sensitive)- Returns:
- if the plugin is on the server
-
getServer
Gets an AdaptedServer from the server name- Parameters:
name- The name of the server- Returns:
- The AdaptedServer
-
getServers
List<? extends AdaptedServer> getServers() -
getProtocolName
-