Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6375

Provide static factory from PermissibleBase

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • 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).

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

              Created:
              Updated: