Interface ServiceContainer

All Superinterfaces:
Listener
All Known Subinterfaces:
AllowedHook, BeaconHook, DialogService, EconomyHook, FlyHook, GuiService, LeashEntityHook, LeashHook, MonsterExperienceHook, MountInsideHook, PartyHook, PermissionGroupHook, PetModelHook, PetModelSourceHook, PlayerVersusEntityHook, PlayerVersusPlayerHook, VanishedHook
All Known Implementing Classes:
ExperienceCache, ExperienceCalculatorManager, LeashFlagManager, SkillManager, SkilltreeManager

public interface ServiceContainer extends Listener
Services are a way to register possible functionality
  • Method Details

    • onEnable

      default boolean onEnable()
      Enables the service and returns if activation was successful
      Returns:
      if activation was successful
    • onDisable

      default void onDisable()
      Disables the service
    • getServiceName

      default String getServiceName()
      Returns the name of the service
      Returns:
      name of the service
    • loadConfig

      default void loadConfig(ConfigurationSection config)
      Optional per-service YAML config block, loaded before onEnable(). Only invoked for services tagged with RequiresPlugin.
      Parameters:
      config - the section holding this service's settings
    • getActivationMessage

      default String getActivationMessage()
      Optional suffix appended to the activation log line.
      Returns:
      a line logged when this service activates, or null for none