Package us.ajg0702.queue.api
Interface PlatformMethods
-
public interface PlatformMethods
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<IBaseCommand>
getCommands()
java.lang.String
getImplementationName()
Gets the name of the implementation.java.util.List<AdaptedPlayer>
getOnlinePlayers()
AdaptedPlayer
getPlayer(java.lang.String name)
Gets an online player by their nameAdaptedPlayer
getPlayer(java.util.UUID uuid)
Gets an online player by their UUIDjava.util.List<java.lang.String>
getPlayerNames(boolean lowercase)
java.lang.String
getPluginVersion()
java.lang.String
getProtocolName(int protocol)
AdaptedServer
getServer(java.lang.String name)
Gets an AdaptedServer from the server namejava.util.List<java.lang.String>
getServerNames()
Gets a list of the server namesjava.util.List<? extends AdaptedServer>
getServers()
boolean
hasPlugin(java.lang.String pluginName)
Checks if a plugin is installedAdaptedPlayer
senderToPlayer(ICommandSender sender)
Converts a command sender to an AdaptedPlayervoid
sendPluginMessage(AdaptedPlayer player, java.lang.String channel, java.lang.String... data)
Sends a plugin message on the plugin messaging channel
-
-
-
Method Detail
-
sendPluginMessage
void sendPluginMessage(AdaptedPlayer player, java.lang.String channel, java.lang.String... data)
Sends a plugin message on the plugin messaging channel- Parameters:
player
- The player to send the message throughchannel
- The (sub)channeldata
- The data
-
senderToPlayer
AdaptedPlayer senderToPlayer(ICommandSender sender)
Converts a command sender to an AdaptedPlayer- Parameters:
sender
- the commandsender- Returns:
- the AdaptedPlayer
-
getPluginVersion
java.lang.String getPluginVersion()
-
getOnlinePlayers
java.util.List<AdaptedPlayer> getOnlinePlayers()
-
getPlayerNames
java.util.List<java.lang.String> getPlayerNames(boolean lowercase)
-
getPlayer
AdaptedPlayer getPlayer(java.lang.String name)
Gets an online player by their name- Parameters:
name
- The players name- Returns:
- The AdaptedPlayer for this player
-
getPlayer
AdaptedPlayer getPlayer(java.util.UUID uuid)
Gets an online player by their UUID- Parameters:
uuid
- their UUID- Returns:
- the AdaptedPlayer for this player
-
getServerNames
java.util.List<java.lang.String> getServerNames()
Gets a list of the server names- Returns:
- A list of the server names
-
getImplementationName
java.lang.String getImplementationName()
Gets the name of the implementation. E.g. bungeecord, velocity- Returns:
- the name of the implementation
-
getCommands
java.util.List<IBaseCommand> getCommands()
-
hasPlugin
boolean hasPlugin(java.lang.String pluginName)
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
AdaptedServer getServer(java.lang.String name)
Gets an AdaptedServer from the server name- Parameters:
name
- The name of the server- Returns:
- The AdaptedServer
-
getServers
java.util.List<? extends AdaptedServer> getServers()
-
getProtocolName
java.lang.String getProtocolName(int protocol)
-
-