private LuckPermsPermissionMap inject() throws Exception {
        Objects.requireNonNull(PERMISSIONS_FIELD, "PERMISSIONS_FIELD");
        PluginManager pluginManager = this.plugin.getBootstrap().getServer().getPluginManager();

        Object map = PERMISSIONS_FIELD.get(pluginManager);
        if (map instanceof LuckPermsPermissionMap && ((LuckPermsPermissionMap) map).plugin == this.plugin) {
            return null;
        }

        //noinspection unchecked
        Map<String, Permission> castedMap = (Map<String, Permission>) map;

        // make a new map & inject it
        LuckPermsPermissionMap newMap = new LuckPermsPermissionMap(this.plugin, castedMap);
        PERMISSIONS_FIELD.set(pluginManager, newMap);
        return newMap;
    }
Injects a {@link LuckPermsPermissionMap} into the {@link PluginManager}.
nukkit/src/main/java/me/lucko/luckperms/nukkit/inject/server/InjectorPermissionMap.java