Class BanItem

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
fr.andross.banitem.BanItem
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public final class BanItem extends org.bukkit.plugin.java.JavaPlugin
BanItemPlugin.
Version:
3.4
Author:
Andross
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull BanItemAPI
    Get the BanItem API.
    @NotNull BanConfig
    Get the ban config helper.
    @NotNull BanDatabase
    Get the ban database, containing custom/meta items, blacklist, and whitelist.
    Get the ban hooks.
    static @NotNull BanItem
    Gives the current instance of the plugin.
    @NotNull BanListener
    Get the class that handle the listeners.
    @NotNull BanUtils
    Utility class for the plugin.
    void
    load(@NotNull org.bukkit.command.CommandSender sender, @Nullable File configFile)
    (re)Loading the plugin with this configuration file.
    boolean
    onCommand(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.command.Command command, @NotNull String label, @NotNull String[] args)
     
    void
     
    @Nullable List<String>
    onTabComplete(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.command.Command command, @NotNull String alias, @NotNull String[] args)
     

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onDisable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BanItem

      public BanItem()
      Default constructor
  • Method Details

    • onEnable

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

      public void load(@NotNull @NotNull org.bukkit.command.CommandSender sender, @Nullable @Nullable File configFile)
      (re)Loading the plugin with this configuration file. If no config file set, using the default config.yml one.
      Parameters:
      sender - command sender (send the message debug to)
      configFile - the file configuration to load. If null, using (and reloading) the default config
    • onCommand

      public boolean onCommand(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.command.Command command, @NotNull @NotNull String label, @NotNull @NotNull String[] args)
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
      Overrides:
      onCommand in class org.bukkit.plugin.java.JavaPlugin
    • onTabComplete

      @Nullable public @Nullable List<String> onTabComplete(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.command.Command command, @NotNull @NotNull String alias, @NotNull @NotNull String[] args)
      Specified by:
      onTabComplete in interface org.bukkit.command.TabCompleter
      Overrides:
      onTabComplete in class org.bukkit.plugin.java.JavaPlugin
    • getInstance

      @NotNull public static @NotNull BanItem getInstance()
      Gives the current instance of the plugin. The plugin should not be accessed this way, but rather with PluginManager.getPlugin(String)
      Returns:
      the current instance of the plugin
    • getApi

      @NotNull public @NotNull BanItemAPI getApi()
      Get the BanItem API.
      Returns:
      the ban item api
    • getBanConfig

      @NotNull public @NotNull BanConfig getBanConfig()
      Get the ban config helper.
      Returns:
      the ban config helper
    • getHooks

      public BanHooks getHooks()
      Get the ban hooks.
      Returns:
      the ban hooks
    • getBanDatabase

      @NotNull public @NotNull BanDatabase getBanDatabase()
      Get the ban database, containing custom/meta items, blacklist, and whitelist.
      Returns:
      the ban database
    • getUtils

      @NotNull public @NotNull BanUtils getUtils()
      Utility class for the plugin.
      Returns:
      utility class for the plugin
    • getListener

      @NotNull public @NotNull BanListener getListener()
      Get the class that handle the listeners.
      Returns:
      the class that handle the listeners