Interface AddonAPI


public interface AddonAPI
API for managing addons that were extended to this plugin
  • Method Details

    • getAll

      Returns all addons that are currently registered.
      Returns:
      All registered addons
    • getByPlugin

      BedwarsAddon[] getByPlugin(Plugin plugin)
      Returns all registered addons whose BedwarsAddon.getPlugin() is equal to the one given as a parameter.
      Parameters:
      plugin - The plugin who created the addons
      Returns:
      All the addons that were created by it
    • getByName

      @Nullable @Nullable BedwarsAddon getByName(String name)
      Returns the registered addon given by its name. Can return null if there's none with that name.
      Parameters:
      name - The name of the addon
      Returns:
      The addon that has the given name. null if there's none
    • getFolder

      File getFolder()
      Returns the folder in which all the addon data is located in.

      By default it's /MBedwars/add-ons/

      Returns:
      The add-ons folder
    • get

      static AddonAPI get()
      Returns the global AddonAPI instance.
      Returns:
      The global AddonAPI instance