Package me.neznamy.tab.api
Interface FeatureManager
public interface FeatureManager
Feature manager allows registration and work with features.
-
Method Summary
Modifier and TypeMethodDescriptiongetFeature(String name) Returns feature handler by its namebooleanisFeatureEnabled(String name) Returns whether a feature with said name is registered or notvoidregisterFeature(String name, TabFeature feature) Registers a feature, which will start receiving eventsvoidunregisterFeature(String name) Unregisters feature making it no longer receive events.
-
Method Details
-
registerFeature
Registers a feature, which will start receiving events- Parameters:
name- name of featurefeature- the handler
-
unregisterFeature
Unregisters feature making it no longer receive events. This does not run unload method nor cancel tasks created by the feature- Parameters:
name- feature name defined in registerFeature
-
isFeatureEnabled
Returns whether a feature with said name is registered or not- Parameters:
name- name of feature defined in registerFeature method- Returns:
- true if feature exists, false if not
-
getFeature
Returns feature handler by its name- Parameters:
name- name of feature defined in registerFeature method- Returns:
- the feature or null if feature does not exist
-