Class ADPBukkitBootstrap

  • All Implemented Interfaces:
    com.alessiodp.core.common.bootstrap.ADPBootstrap, org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

    public abstract class ADPBukkitBootstrap
    extends org.bukkit.plugin.java.JavaPlugin
    implements com.alessiodp.core.common.bootstrap.ADPBootstrap
    • Field Detail

      • plugin

        protected com.alessiodp.core.common.ADPPlugin plugin
    • Constructor Detail

      • ADPBukkitBootstrap

        public ADPBukkitBootstrap()
    • Method Detail

      • onLoad

        public void onLoad()
        Specified by:
        onLoad in interface org.bukkit.plugin.Plugin
        Overrides:
        onLoad in class org.bukkit.plugin.java.JavaPlugin
      • onEnable

        public void onEnable()
        Specified by:
        onEnable in interface org.bukkit.plugin.Plugin
        Overrides:
        onEnable in class org.bukkit.plugin.java.JavaPlugin
      • onDisable

        public void onDisable()
        Specified by:
        onDisable in interface org.bukkit.plugin.Plugin
        Overrides:
        onDisable in class org.bukkit.plugin.java.JavaPlugin
      • getBootstrap

        @NotNull
        public @NotNull com.alessiodp.core.common.bootstrap.ADPBootstrap getBootstrap()
        Specified by:
        getBootstrap in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • initializeLogger

        @NotNull
        public @NotNull com.alessiodp.core.common.logging.logger.ADPLogger initializeLogger()
        Specified by:
        initializeLogger in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • getFolder

        @NotNull
        public @NotNull Path getFolder()
        Specified by:
        getFolder in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • getAuthor

        @NotNull
        public @NotNull String getAuthor()
        Specified by:
        getAuthor in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • getPlatform

        @NotNull
        public @NotNull com.alessiodp.core.common.bootstrap.PluginPlatform getPlatform()
        Specified by:
        getPlatform in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • getVersion

        @NotNull
        public @NotNull String getVersion()
        Specified by:
        getVersion in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • stopPlugin

        public void stopPlugin()
        Specified by:
        stopPlugin in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • isPluginEnabled

        public boolean isPluginEnabled​(@NotNull
                                       @NotNull String pluginName)
        Specified by:
        isPluginEnabled in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • getResource

        @Nullable
        public @Nullable InputStream getResource​(@NotNull
                                                 @NotNull String resource)
        Specified by:
        getResource in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
        Specified by:
        getResource in interface org.bukkit.plugin.Plugin
        Overrides:
        getResource in class org.bukkit.plugin.java.JavaPlugin
      • getPlayer

        @Nullable
        public @Nullable com.alessiodp.core.common.user.User getPlayer​(@NotNull
                                                                       @NotNull UUID uuid)
        Specified by:
        getPlayer in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • getPlayerByName

        @Nullable
        public @Nullable com.alessiodp.core.common.user.User getPlayerByName​(@NotNull
                                                                             @NotNull String name)
        Specified by:
        getPlayerByName in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • getOfflinePlayer

        @Nullable
        public @Nullable com.alessiodp.core.common.user.OfflineUser getOfflinePlayer​(@NotNull
                                                                                     @NotNull UUID uuid)
        Specified by:
        getOfflinePlayer in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • getOnlinePlayers

        @NotNull
        public @NotNull List<com.alessiodp.core.common.user.User> getOnlinePlayers()
        Specified by:
        getOnlinePlayers in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • executeCommand

        public void executeCommand​(@NotNull
                                   @NotNull String command)
        Specified by:
        executeCommand in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • executeCommandByUser

        public void executeCommandByUser​(@NotNull
                                         @NotNull String command,
                                         @NotNull
                                         @NotNull com.alessiodp.core.common.user.User user)
        Specified by:
        executeCommandByUser in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • registerListener

        public void registerListener​(@NotNull
                                     @NotNull Object object)
        Specified by:
        registerListener in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • unregisterListener

        public void unregisterListener​(@NotNull
                                       @NotNull Object object)
        Specified by:
        unregisterListener in interface com.alessiodp.core.common.bootstrap.ADPBootstrap
      • isSpigot

        public boolean isSpigot()
        Check if is running Spigot
        Returns:
        true if Spigot API works