Interface PlatformMethods


public interface PlatformMethods
  • Method Details

    • sendPluginMessage

      void sendPluginMessage(AdaptedPlayer player, String channel, String... data)
      Sends a plugin message on the plugin messaging channel
      Parameters:
      player - The player to send the message through
      channel - The (sub)channel
      data - The data
    • senderToPlayer

      AdaptedPlayer senderToPlayer(ICommandSender sender)
      Converts a command sender to an AdaptedPlayer
      Parameters:
      sender - the commandsender
      Returns:
      the AdaptedPlayer
    • getPluginVersion

      String getPluginVersion()
    • getOnlinePlayers

      List<AdaptedPlayer> getOnlinePlayers()
    • getPlayerNames

      List<String> getPlayerNames(boolean lowercase)
    • getPlayer

      AdaptedPlayer getPlayer(String name)
      Gets an online player by their name
      Parameters:
      name - The players name
      Returns:
      The AdaptedPlayer for this player
    • getPlayer

      AdaptedPlayer getPlayer(UUID uuid)
      Gets an online player by their UUID
      Parameters:
      uuid - their UUID
      Returns:
      the AdaptedPlayer for this player
    • getServerNames

      List<String> 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

      boolean hasPlugin(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(String name)
      Gets an AdaptedServer from the server name
      Parameters:
      name - The name of the server
      Returns:
      The AdaptedServer
    • getServers

      List<? extends AdaptedServer> getServers()
    • getProtocolName

      String getProtocolName(int protocol)