Class Main

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
xyz.geik.farmer.Main
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public class Main extends org.bukkit.plugin.java.JavaPlugin
Main class of farmer There is only loads, apis and startup task codes.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Map<FarmerModule,org.bukkit.event.Listener>
    Listener list of modules
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor of class
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    disable method calls from spigot api.
    void
    onEnable method calls from spigot api.
    void
    Loading files before enable
    void
    Setups config, lang and modules file file

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

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onTabComplete, 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
  • Field Details

    • listenerList

      public Map<FarmerModule,org.bukkit.event.Listener> listenerList
      Listener list of modules
  • Constructor Details

    • Main

      public Main()
      Constructor of class
  • Method Details

    • onLoad

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

      public void onEnable()
      onEnable method calls from spigot api. This is sort of the main(String... args) method.
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      disable method calls from spigot api. executing it right before close. async tasks can be fail because server can't handle async tasks while shutting down
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • setupFiles

      public void setupFiles()
      Setups config, lang and modules file file