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).
|