Class MinecraftPermissionsEx.Builder<C>

  • All Implemented Interfaces:
    ca.stellardrift.permissionsex.PermissionsEngineBuilder<C>
    Enclosing class:
    MinecraftPermissionsEx<T>

    public static final class MinecraftPermissionsEx.Builder<C>
    extends Object
    implements ca.stellardrift.permissionsex.PermissionsEngineBuilder<C>
    A builder for a Minecraft PermissionsEx engine.
    Since:
    2.0.0
    • Method Detail

      • playerProvider

        public MinecraftPermissionsEx.Builder<CplayerProvider​(Function<UUID,​?> playerProvider)
        Set a function that will look up players by UUID, to provide an associated object for subjects.
        Parameters:
        playerProvider - the player provider
        Returns:
        this builder
        Since:
        2.0.0
      • commands

        public MinecraftPermissionsEx.Builder<Ccommands​(Function<Function<cloud.commandframework.CommandTree<Commander>,​cloud.commandframework.execution.CommandExecutionCoordinator<Commander>>,​cloud.commandframework.CommandManager<Commander>> manager)
        If commands should be registered, set the command manager to register with.
        Parameters:
        manager - the manager
        Returns:
        this builder
        Since:
        2.0.0
      • build

        @Deprecated
        public ca.stellardrift.permissionsex.PermissionsEngine build()
                                                              throws ca.stellardrift.permissionsex.exception.PermissionsLoadingException
        Deprecated.
        This method should not be called directly.
        Specified by:
        build in interface ca.stellardrift.permissionsex.PermissionsEngineBuilder<C>
        Returns:
        a new permissions engine
        Throws:
        ca.stellardrift.permissionsex.exception.PermissionsLoadingException
      • buildWithConfig

        @Deprecated
        public Map.Entry<ca.stellardrift.permissionsex.PermissionsEngine,​Supplier<C>> buildWithConfig()
        Deprecated.
        This method should not be called directly.
        Specified by:
        buildWithConfig in interface ca.stellardrift.permissionsex.PermissionsEngineBuilder<C>
        Returns:
        a new permissions engine
      • create

        public MinecraftPermissionsEx<Ccreate()
                                         throws ca.stellardrift.permissionsex.exception.PermissionsLoadingException
        Build an engine.

        The implementation interface must have been set.

        Returns:
        a new instance
        Throws:
        ca.stellardrift.permissionsex.exception.PermissionsLoadingException - if unable to load initial data
        Since:
        2.0.0