Class AbstractPlugin

  • All Implemented Interfaces:
    Plugin

    public abstract class AbstractPlugin
    extends Object
    implements Plugin
    Implements a plugin interface to help who will create a plugin do not create all methods.
    The only method not implemented is getId which must implemented.
    All onBefore* cancelable methods return true.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • AbstractPlugin

        protected AbstractPlugin​(String pluginId)
        Creates the plugin using the id passed as argument.
        Parameters:
        pluginId - plugin id to use
    • Method Detail

      • getId

        public final String getId()
        Description copied from interface: Plugin
        Plugins must define a unique id in order to be configurable.
        Returns the plugin id. A plugin id
        • can not start with a dot or an underscore
        • can not contain any non-URL-safe characters
        • cannot contain upper-case letters
        • should be something short, but also reasonably descriptive
        Specified by:
        getId in interface Plugin
        Returns:
        the plugin id.