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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the ban api
    Get a the ban config helper
    Get the ban database, containing blacklist, whitelist and customitems
    Get the ban hooks
    static BanItem
    Gives the current instance of the plugin.
    Get the class that handle the listeners
    An utility class for the plugin
    void
    load(org.bukkit.command.CommandSender sender, File configFile)
    (re)Loading the plugin with this configuration file.
    boolean
    onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)
     
    void
     
    onTabComplete(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, 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()
  • 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 org.bukkit.command.CommandSender sender, @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 org.bukkit.command.CommandSender sender, @NotNull org.bukkit.command.Command command, @NotNull String label, @NotNull String[] args)
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
      Overrides:
      onCommand in class org.bukkit.plugin.java.JavaPlugin
    • onTabComplete

      @Nullable public List<String> onTabComplete(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.command.Command command, @NotNull String alias, @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 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 BanItemAPI getApi()
      Get the ban api
      Returns:
      the ban item api
    • getBanConfig

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

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

      @NotNull public BanDatabase getBanDatabase()
      Get the ban database, containing blacklist, whitelist and customitems
      Returns:
      the ban database
    • getUtils

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

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