Skip to content

Added missing command registration support for the Qbox framework module.#193

Open
PeppeSess wants to merge 3 commits into
TheOrderFivem:devfrom
PeppeSess:patch-1
Open

Added missing command registration support for the Qbox framework module.#193
PeppeSess wants to merge 3 commits into
TheOrderFivem:devfrom
PeppeSess:patch-1

Conversation

@PeppeSess

Copy link
Copy Markdown

Description

Added missing command registration support for the Qbox framework module.

The ESX and QBCore framework modules already expose Framework.Commands.Add, but the Qbox module did not define Framework.Commands, causing resources that rely on the unified Community Bridge command API to fail on Qbox with:

attempt to index a nil value (field 'Commands')

This PR adds Framework.Commands.Add to the Qbox server framework module using lib.addCommand, while preserving the same public bridge API used by the other framework modules.

Admin-restricted commands are checked through the existing Qbox bridge admin resolver:

Framework.GetIsFrameworkAdmin(source)

This keeps command registration consistent across the different frameworks

Testing Steps

  1. Started a server using Qbox with Community Bridge.
  2. Loaded a resource that registers commands through:
Bridge.Framework.Commands.Add(name, help, arguments, argsrequired, callback, permission)
  1. Confirmed that the resource no longer fails during initialization with field 'Commands' being nil.
  2. Tested a user command with permission = "user" and confirmed it executes successfully.
  3. Tested an admin command with permission = "admin" and confirmed it only executes when Framework.GetIsFrameworkAdmin(source) returns true.
  4. Confirmed existing ESX and QBCore behavior is not affected because the change only applies to the Qbox framework module.

Additional Notes

This change aligns the Qbox framework module with the existing ESX and QBCore bridge structure by exposing the same Framework.Commands.Add API.

The implementation uses lib.addCommand, which is already available through Community Bridge’s ox_lib dependency.

Added missing command registration support for the Qbox framework module.

The ESX and QBCore framework modules already expose `Framework.Commands.Add`, but the Qbox module did not define `Framework.Commands`, causing resources that rely on the unified Community Bridge command API to fail on Qbox
Comment thread modules/framework/qbx_core/server.lua Outdated
@gononono64

Copy link
Copy Markdown
Contributor

Minor issue but rest looks good. Needs testing

fixed a small careless error
@PeppeSess

Copy link
Copy Markdown
Author

Commit updated, thanks

Comment thread modules/framework/qbx_core/server.lua Outdated
end)

return Framework No newline at end of file
AddEventHandler("playerDropped", function()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate

@MrNewb

MrNewb commented May 30, 2026

Copy link
Copy Markdown
Contributor

@PeppeSess
Few more duplicates, if you could patch them and update this or resubmit

removed duplicates
@PeppeSess

Copy link
Copy Markdown
Author

@PeppeSess Few more duplicates, if you could patch them and update this or resubmit

everything should be okay now, sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants