Class AbstractADPPlugin

    • Constructor Detail

      • AbstractADPPlugin

        public AbstractADPPlugin()
    • Method Detail

      • getFolder

        @NotNull
        public @NotNull Path getFolder()
        Description copied from interface: ADPBootstrap
        Get plugin folder
        Specified by:
        getFolder in interface ADPBootstrap
        Returns:
        the plugin folder path
      • getAuthor

        @NotNull
        public @NotNull String getAuthor()
        Description copied from interface: ADPBootstrap
        Get plugin author
        Specified by:
        getAuthor in interface ADPBootstrap
        Returns:
        the author of the plugin
      • getVersion

        @NotNull
        public @NotNull String getVersion()
        Description copied from interface: ADPBootstrap
        Get plugin version
        Specified by:
        getVersion in interface ADPBootstrap
        Returns:
        the version of the plugin
      • getResource

        @Nullable
        public @Nullable InputStream getResource​(@NotNull
                                                 @NotNull String resource)
        Description copied from interface: ADPBootstrap
        Get resource from plugin resources
        Specified by:
        getResource in interface ADPBootstrap
        Parameters:
        resource - the resource name
        Returns:
        the resource found
      • isPluginEnabled

        public boolean isPluginEnabled​(@NotNull
                                       @NotNull String pluginName)
        Description copied from interface: ADPBootstrap
        Is the plugin enabled?
        Specified by:
        isPluginEnabled in interface ADPBootstrap
        Parameters:
        pluginName - the name of the plugin
        Returns:
        true if the given plugin is enabled
      • getPlayer

        @Nullable
        public @Nullable User getPlayer​(@NotNull
                                        @NotNull UUID uuid)
        Description copied from interface: ADPBootstrap
        Get player with given uuid
        Specified by:
        getPlayer in interface ADPBootstrap
        Parameters:
        uuid - uuid of the player
        Returns:
        the player found
      • getPlayerByName

        @Nullable
        public @Nullable User getPlayerByName​(@NotNull
                                              @NotNull String name)
        Description copied from interface: ADPBootstrap
        Get player with given name
        Specified by:
        getPlayerByName in interface ADPBootstrap
        Parameters:
        name - name of the player
        Returns:
        the player found
      • getOfflinePlayer

        @Nullable
        public @Nullable OfflineUser getOfflinePlayer​(@NotNull
                                                      @NotNull UUID uuid)
        Description copied from interface: ADPBootstrap
        Get offline player with given uuid
        Specified by:
        getOfflinePlayer in interface ADPBootstrap
        Parameters:
        uuid - uuid of the player
        Returns:
        the offline player found
      • getOnlinePlayers

        @NotNull
        public @NotNull List<User> getOnlinePlayers()
        Description copied from interface: ADPBootstrap
        Get online players list
        Specified by:
        getOnlinePlayers in interface ADPBootstrap
        Returns:
        a list of online players
      • executeCommand

        public void executeCommand​(@NotNull
                                   @NotNull String command)
        Description copied from interface: ADPBootstrap
        Execute the command via console
        Specified by:
        executeCommand in interface ADPBootstrap
        Parameters:
        command - the command to execute
      • executeCommandByUser

        public void executeCommandByUser​(@NotNull
                                         @NotNull String command,
                                         @NotNull
                                         @NotNull User user)
        Description copied from interface: ADPBootstrap
        Execute the command via console
        Specified by:
        executeCommandByUser in interface ADPBootstrap
        Parameters:
        command - the command to execute
        user - the user executor
      • registerListener

        public void registerListener​(@NotNull
                                     @NotNull Object object)
        Description copied from interface: ADPBootstrap
        Register a listener
        Specified by:
        registerListener in interface ADPBootstrap
        Parameters:
        object - the listener to register
      • unregisterListener

        public void unregisterListener​(@NotNull
                                       @NotNull Object object)
        Description copied from interface: ADPBootstrap
        Unregister a listener
        Specified by:
        unregisterListener in interface ADPBootstrap
        Parameters:
        object - the listener to unregister
      • getPluginName

        @NotNull
        public abstract @NotNull String getPluginName()
        Get plugin name
        Returns:
        the name of the plugin
      • getPluginFallbackName

        @NotNull
        public abstract @NotNull String getPluginFallbackName()
        Get plugin fallback name
        Returns:
        the fallback name of the plugin
      • getBstatsId

        public abstract int getBstatsId()
        Get bStats plugin id
        Returns:
        the id of the plugin
      • getPackageName

        @NotNull
        public abstract @NotNull String getPackageName()
        Get the package name
        Returns:
        the package name