Provide static factory from PermissibleBase

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      Bukkit, specification.

      CraftBukkit, refactor/implementation.

    • 1.16.5-R0.1-SNAPSHOT
    • Yes

      At present, the prevailing solution to offer greatest programmability for permission logic involves runtime reflection on implementation player objects (specifically, CraftPlayer). I propose creating a static Function<ServerOperator, PermissibleBase> field in PermissibleBase with static setter and a corresponding static factory. A permission plugin may thus register the constructor of its custom subclass with no reflection required, allowing for cleaner override of CraftBukkit implementation.

      I would like to discuss interest in this feature. It represents a small change in the API and a few changes to CraftBukkit classes which currently invoke new PermissibleBase(ServerOperator).

            Assignee:
            Unassigned
            Reporter:
            Matthew Sanders
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: