Interface PlatformMethods


  • public interface PlatformMethods
    • 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 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

        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
      • 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)