Class SimplePluginManager
- All Implemented Interfaces:
- PermissionManager,- PluginManager
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal Map<Boolean,Set<Permission>> Deprecated, for removal: This API element is subject to removal in a future version.final Map<Boolean,Map<Permissible, Boolean>> Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.final Map<String,Permission> Deprecated, for removal: This API element is subject to removal in a future version.final Map<String,Map<Permissible, Boolean>> Deprecated, for removal: This API element is subject to removal in a future version.
- 
Constructor SummaryConstructorsConstructorDescriptionSimplePluginManager(@NotNull Server instance, @NotNull SimpleCommandMap commandMap) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPermission(@NotNull Permission perm) Deprecated, for removal: This API element is subject to removal in a future version.Adds aPermissionto this plugin manager.voidaddPermission(@NotNull Permission perm, boolean dirty) Deprecated.voidaddPermissions(@NotNull List<Permission> perm) Deprecated, for removal: This API element is subject to removal in a future version.Adds a list of permissions.voidDeprecated, for removal: This API element is subject to removal in a future version.Calls an event with the given details.voidDeprecated, for removal: This API element is subject to removal in a future version.Clears the current registered permissinos.voidDeprecated, for removal: This API element is subject to removal in a future version.Disables and removes all pluginsvoidDeprecated.voiddisablePlugin(@NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Disables the specified pluginvoidDeprecated, for removal: This API element is subject to removal in a future version.Disables all the loaded pluginsvoidenablePlugin(@NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Enables the specified plugingetDefaultPermissions(boolean op) Deprecated, for removal: This API element is subject to removal in a future version.Gets the default permissions for the given op statusgetDefaultPermSubscriptions(boolean op) Deprecated, for removal: This API element is subject to removal in a future version.Gets a set containing all subscribedPermissibles to the given default list, by op statusgetPermission(@NotNull String name) Deprecated, for removal: This API element is subject to removal in a future version.Gets aPermissionfrom its fully qualified nameDeprecated, for removal: This API element is subject to removal in a future version.Gets a set of all registered permissions.getPermissionSubscriptions(@NotNull String permission) Deprecated, for removal: This API element is subject to removal in a future version.Gets a set containing all subscribedPermissibles to the given permission, by nameDeprecated, for removal: This API element is subject to removal in a future version.Checks if the given plugin is loaded and returns it when applicableDeprecated, for removal: This API element is subject to removal in a future version.Gets a list of all currently loaded pluginsbooleanisPluginEnabled(@NotNull String name) Deprecated, for removal: This API element is subject to removal in a future version.Checks if the given plugin is enabled or notbooleanisPluginEnabled(@Nullable Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Checks if the given plugin is enabled or notbooleanisTransitiveDepend(@NotNull PluginDescriptionFile plugin, @NotNull PluginDescriptionFile depend) Deprecated, for removal: This API element is subject to removal in a future version.booleanisTransitiveDependency(PluginMeta pluginMeta, PluginMeta dependencyConfig) Deprecated, for removal: This API element is subject to removal in a future version.loadPlugin(@NotNull File file) Deprecated, for removal: This API element is subject to removal in a future version.Loads the plugin in the specified fileloadPlugins(@NotNull File directory) Deprecated, for removal: This API element is subject to removal in a future version.Loads the plugins contained within the specified directoryDeprecated, for removal: This API element is subject to removal in a future version.voidoverridePermissionManager(@NotNull Plugin plugin, PermissionManager permissionManager) Deprecated, for removal: This API element is subject to removal in a future version.Sets the permission manager to be used for this server.voidDeprecated, for removal: This API element is subject to removal in a future version.Recalculates the defaults for the givenPermission.voidregisterEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Registers the specified executor to the given event classvoidregisterEvent(@NotNull Class<? extends Event> event, @NotNull Listener listener, @NotNull EventPriority priority, @NotNull EventExecutor executor, @NotNull Plugin plugin, boolean ignoreCancelled) Deprecated, for removal: This API element is subject to removal in a future version.Registers the given event to the specified listener using a directly passed EventExecutorvoidregisterEvents(@NotNull Listener listener, @NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Registers all the events in the given listener classvoidregisterInterface(@NotNull Class<? extends PluginLoader> loader) Deprecated, for removal: This API element is subject to removal in a future version.Registers the specified plugin loadervoidremovePermission(@NotNull String name) Deprecated, for removal: This API element is subject to removal in a future version.Removes aPermissionregistration from this plugin manager.voidDeprecated, for removal: This API element is subject to removal in a future version.Removes aPermissionregistration from this plugin manager.voidsubscribeToDefaultPerms(boolean op, @NotNull Permissible permissible) Deprecated, for removal: This API element is subject to removal in a future version.Subscribes to the given Default permissions by operator statusvoidsubscribeToPermission(@NotNull String permission, @NotNull Permissible permissible) Deprecated, for removal: This API element is subject to removal in a future version.Subscribes the given Permissible for information about the requested Permission, by name.voidunsubscribeFromDefaultPerms(boolean op, @NotNull Permissible permissible) Deprecated, for removal: This API element is subject to removal in a future version.Unsubscribes from the given Default permissions by operator statusvoidunsubscribeFromPermission(@NotNull String permission, @NotNull Permissible permissible) Deprecated, for removal: This API element is subject to removal in a future version.Unsubscribes the given Permissible for information about the requested Permission, by name.booleanDeprecated, for removal: This API element is subject to removal in a future version.Returns whether or not timing code should be used for event callsvoiduseTimings(boolean use) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not per event timing code should be used
- 
Field Details- 
permissionsDeprecated, for removal: This API element is subject to removal in a future version.
- 
defaultPermsDeprecated, for removal: This API element is subject to removal in a future version.
- 
permSubsDeprecated, for removal: This API element is subject to removal in a future version.
- 
defSubsDeprecated, for removal: This API element is subject to removal in a future version.
- 
paperPluginManagerDeprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Constructor Details
- 
Method Details- 
registerInterfacepublic void registerInterface(@NotNull @NotNull Class<? extends PluginLoader> loader) throws IllegalArgumentException Deprecated, for removal: This API element is subject to removal in a future version.Registers the specified plugin loader- Specified by:
- registerInterfacein interface- PluginManager
- Parameters:
- loader- Class name of the PluginLoader to register
- Throws:
- IllegalArgumentException- Thrown when the given Class is not a valid PluginLoader
 
- 
loadPluginsDeprecated, for removal: This API element is subject to removal in a future version.Loads the plugins contained within the specified directory- Specified by:
- loadPluginsin interface- PluginManager
- Parameters:
- directory- Directory to check for plugins
- Returns:
- A list of all plugins loaded
 
- 
loadPlugins@NotNull public @NotNull Plugin[] loadPlugins(@NotNull @NotNull File directory, @NotNull @NotNull List<File> extraPluginJars) Deprecated, for removal: This API element is subject to removal in a future version.
- 
loadPlugin@Nullable public @Nullable Plugin loadPlugin(@NotNull @NotNull File file) throws InvalidPluginException, UnknownDependencyException Deprecated, for removal: This API element is subject to removal in a future version.Loads the plugin in the specified fileFile must be valid according to the current enabled Plugin interfaces - Specified by:
- loadPluginin interface- PluginManager
- Parameters:
- file- File containing the plugin to load
- Returns:
- The Plugin loaded, or null if it was invalid
- Throws:
- InvalidPluginException- Thrown when the specified file is not a valid plugin
- UnknownDependencyException- If a required dependency could not be found
 
- 
getPluginDeprecated, for removal: This API element is subject to removal in a future version.Checks if the given plugin is loaded and returns it when applicablePlease note that the name of the plugin is case-sensitive - Specified by:
- getPluginin interface- PluginManager
- Parameters:
- name- Name of the plugin to check
- Returns:
- Plugin if it exists, otherwise null
 
- 
getPluginsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerGets a list of all currently loaded plugins- Specified by:
- getPluginsin interface- PluginManager
- Returns:
- Array of Plugins
 
- 
isPluginEnabledDeprecated, for removal: This API element is subject to removal in a future version.Checks if the given plugin is enabled or notPlease note that the name of the plugin is case-sensitive. - Specified by:
- isPluginEnabledin interface- PluginManager
- Parameters:
- name- Name of the plugin to check
- Returns:
- true if the plugin is enabled, otherwise false
 
- 
isPluginEnabledDeprecated, for removal: This API element is subject to removal in a future version.Checks if the given plugin is enabled or not- Specified by:
- isPluginEnabledin interface- PluginManager
- Parameters:
- plugin- Plugin to check
- Returns:
- true if the plugin is enabled, otherwise false
 
- 
enablePluginDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerEnables the specified pluginAttempting to enable a plugin that is already enabled will have no effect - Specified by:
- enablePluginin interface- PluginManager
- Parameters:
- plugin- Plugin to enable
 
- 
disablePluginspublic void disablePlugins()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerDisables all the loaded plugins- Specified by:
- disablePluginsin interface- PluginManager
 
- 
disablePluginDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerDisables the specified pluginAttempting to disable a plugin that is not enabled will have no effect - Specified by:
- disablePluginin interface- PluginManager
- Parameters:
- plugin- Plugin to disable
 
- 
clearPluginspublic void clearPlugins()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerDisables and removes all plugins- Specified by:
- clearPluginsin interface- PluginManager
 
- 
callEventDeprecated, for removal: This API element is subject to removal in a future version.Calls an event with the given details.- Specified by:
- callEventin interface- PluginManager
- Parameters:
- event- Event details
 
- 
registerEventsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerRegisters all the events in the given listener class- Specified by:
- registerEventsin interface- PluginManager
- Parameters:
- listener- Listener to register
- plugin- Plugin to register
 
- 
registerEventpublic void registerEvent(@NotNull @NotNull Class<? extends Event> event, @NotNull @NotNull Listener listener, @NotNull @NotNull EventPriority priority, @NotNull @NotNull EventExecutor executor, @NotNull @NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerRegisters the specified executor to the given event class- Specified by:
- registerEventin interface- PluginManager
- Parameters:
- event- Event type to register
- listener- Listener to register
- priority- Priority to register this event at
- executor- EventExecutor to register
- plugin- Plugin to register
 
- 
registerEventpublic void registerEvent(@NotNull @NotNull Class<? extends Event> event, @NotNull @NotNull Listener listener, @NotNull @NotNull EventPriority priority, @NotNull @NotNull EventExecutor executor, @NotNull @NotNull Plugin plugin, boolean ignoreCancelled) Deprecated, for removal: This API element is subject to removal in a future version.Registers the given event to the specified listener using a directly passed EventExecutor- Specified by:
- registerEventin interface- PluginManager
- Parameters:
- event- Event class to register
- listener- PlayerListener to register
- priority- Priority of this event
- executor- EventExecutor to register
- plugin- Plugin to register
- ignoreCancelled- Do not call executor if event was already cancelled
 
- 
getPermissionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerGets aPermissionfrom its fully qualified name- Specified by:
- getPermissionin interface- PermissionManager
- Specified by:
- getPermissionin interface- PluginManager
- Parameters:
- name- Name of the permission
- Returns:
- Permission, or null if none
 
- 
addPermissionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerAdds aPermissionto this plugin manager.If a permission is already defined with the given name of the new permission, an exception will be thrown. - Specified by:
- addPermissionin interface- PermissionManager
- Specified by:
- addPermissionin interface- PluginManager
- Parameters:
- perm- Permission to add
 
- 
addPermissionDeprecated.
- 
getDefaultPermissionsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerGets the default permissions for the given op status- Specified by:
- getDefaultPermissionsin interface- PermissionManager
- Specified by:
- getDefaultPermissionsin interface- PluginManager
- Parameters:
- op- Which set of default permissions to get
- Returns:
- The default permissions
 
- 
removePermissionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerRemoves aPermissionregistration from this plugin manager.If the specified permission does not exist in this plugin manager, nothing will happen. Removing a permission registration will not remove the permission from any Permissibles that have it.- Specified by:
- removePermissionin interface- PermissionManager
- Specified by:
- removePermissionin interface- PluginManager
- Parameters:
- perm- Permission to remove
 
- 
removePermissionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerRemoves aPermissionregistration from this plugin manager.If the specified permission does not exist in this plugin manager, nothing will happen. Removing a permission registration will not remove the permission from any Permissibles that have it.- Specified by:
- removePermissionin interface- PermissionManager
- Specified by:
- removePermissionin interface- PluginManager
- Parameters:
- name- Permission to remove
 
- 
recalculatePermissionDefaultsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerRecalculates the defaults for the givenPermission.This will have no effect if the specified permission is not registered here. - Specified by:
- recalculatePermissionDefaultsin interface- PermissionManager
- Specified by:
- recalculatePermissionDefaultsin interface- PluginManager
- Parameters:
- perm- Permission to recalculate
 
- 
dirtyPermissiblesDeprecated.
- 
subscribeToPermissionpublic void subscribeToPermission(@NotNull @NotNull String permission, @NotNull @NotNull Permissible permissible) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerSubscribes the given Permissible for information about the requested Permission, by name.If the specified Permission changes in any form, the Permissible will be asked to recalculate. - Specified by:
- subscribeToPermissionin interface- PermissionManager
- Specified by:
- subscribeToPermissionin interface- PluginManager
- Parameters:
- permission- Permission to subscribe to
- permissible- Permissible subscribing
 
- 
unsubscribeFromPermissionpublic void unsubscribeFromPermission(@NotNull @NotNull String permission, @NotNull @NotNull Permissible permissible) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerUnsubscribes the given Permissible for information about the requested Permission, by name.- Specified by:
- unsubscribeFromPermissionin interface- PermissionManager
- Specified by:
- unsubscribeFromPermissionin interface- PluginManager
- Parameters:
- permission- Permission to unsubscribe from
- permissible- Permissible subscribing
 
- 
getPermissionSubscriptions@NotNull public @NotNull Set<Permissible> getPermissionSubscriptions(@NotNull @NotNull String permission) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerGets a set containing all subscribedPermissibles to the given permission, by name- Specified by:
- getPermissionSubscriptionsin interface- PermissionManager
- Specified by:
- getPermissionSubscriptionsin interface- PluginManager
- Parameters:
- permission- Permission to query for
- Returns:
- Set containing all subscribed permissions
 
- 
subscribeToDefaultPermsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerSubscribes to the given Default permissions by operator statusIf the specified defaults change in any form, the Permissible will be asked to recalculate. - Specified by:
- subscribeToDefaultPermsin interface- PermissionManager
- Specified by:
- subscribeToDefaultPermsin interface- PluginManager
- Parameters:
- op- Default list to subscribe to
- permissible- Permissible subscribing
 
- 
unsubscribeFromDefaultPermsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerUnsubscribes from the given Default permissions by operator status- Specified by:
- unsubscribeFromDefaultPermsin interface- PermissionManager
- Specified by:
- unsubscribeFromDefaultPermsin interface- PluginManager
- Parameters:
- op- Default list to unsubscribe from
- permissible- Permissible subscribing
 
- 
getDefaultPermSubscriptionsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerGets a set containing all subscribedPermissibles to the given default list, by op status- Specified by:
- getDefaultPermSubscriptionsin interface- PermissionManager
- Specified by:
- getDefaultPermSubscriptionsin interface- PluginManager
- Parameters:
- op- Default list to query for
- Returns:
- Set containing all subscribed permissions
 
- 
getPermissionsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerGets a set of all registered permissions.This set is a copy and will not be modified live. - Specified by:
- getPermissionsin interface- PermissionManager
- Specified by:
- getPermissionsin interface- PluginManager
- Returns:
- Set containing all current registered permissions
 
- 
isTransitiveDependpublic boolean isTransitiveDepend(@NotNull @NotNull PluginDescriptionFile plugin, @NotNull @NotNull PluginDescriptionFile depend) Deprecated, for removal: This API element is subject to removal in a future version.
- 
useTimingspublic boolean useTimings()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerReturns whether or not timing code should be used for event calls- Specified by:
- useTimingsin interface- PluginManager
- Returns:
- True if event timings are to be used
 
- 
useTimingspublic void useTimings(boolean use) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not per event timing code should be used- Parameters:
- use- True if per event timing code should be used
 
- 
clearPermissionspublic void clearPermissions()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PermissionManagerClears the current registered permissinos.This is used for reloading. - Specified by:
- clearPermissionsin interface- PermissionManager
 
- 
isTransitiveDependencyDeprecated, for removal: This API element is subject to removal in a future version.- Specified by:
- isTransitiveDependencyin interface- PluginManager
 
- 
overridePermissionManagerpublic void overridePermissionManager(@NotNull @NotNull Plugin plugin, @Nullable PermissionManager permissionManager) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginManagerSets the permission manager to be used for this server.- Specified by:
- overridePermissionManagerin interface- PluginManager
- permissionManager- permission manager
 
- 
addPermissionsDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PermissionManagerAdds a list of permissions.This is meant as an optimization for adding multiple permissions without recalculating each permission. - Specified by:
- addPermissionsin interface- PermissionManager
- Parameters:
- perm- permission
 
 
-