Package de.Keyle.MyPet.api.util.service
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
Services are a way to register possible functionality
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringOptional suffix appended to the activation log line.default StringReturns the name of the servicedefault voidloadConfig(ConfigurationSection config) Optional per-service YAML config block, loaded beforeonEnable().default voidDisables the servicedefault booleanonEnable()Enables the service and returns if activation was successful
-
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
Returns the name of the service- Returns:
- name of the service
-
loadConfig
Optional per-service YAML config block, loaded beforeonEnable(). Only invoked for services tagged withRequiresPlugin.- Parameters:
config- the section holding this service's settings
-
getActivationMessage
Optional suffix appended to the activation log line.- Returns:
- a line logged when this service activates, or
nullfor none
-