@Override
    protected void setupContextManager() {
        this.contextManager = new VelocityContextManager(this);

        Set<String> disabledContexts = getConfiguration().get(ConfigKeys.DISABLED_CONTEXTS);
        if (!disabledContexts.contains(DefaultContextKeys.WORLD_KEY)) {
            VelocityPlayerCalculator playerCalculator = new VelocityPlayerCalculator(this);
            this.bootstrap.getProxy().getEventManager().register(this.bootstrap, playerCalculator);
            this.contextManager.registerCalculator(playerCalculator);
        }
    }
LuckPerms implementation for the Velocity API.
velocity/src/main/java/me/lucko/luckperms/velocity/LPVelocityPlugin.java