UgCore global. Each namespace has a page in this reference.
Core
Enums, Events, Lifecycle, Config, Logger, Version, Modules.
Networking and security
Schema, RateLimit, Callback, Network, Guard, Hooks.
Modules
Identity, Players, LocalPlayer, Permissions, Characters, Accounts, Jobs, Gangs, Sessions, Commands, Locale.
Where a function runs
Each function is marked with where it exists: Server only on the server. Client only on clients. Shared on both, with the same signature. Some namespaces exist on both sides with different functions, such asAccounts: the client side reads the local player’s data.
Return values
Functions that change state returnok first, then a value, then an error code:
ok is a boolean, the value is nil on failure, the error code is nil on success. Error codes are listed in Error codes.
Errors
Wrong API usage raises an error that points to your line and starts with[ug-core]:
Threads
Functions that touch the database or wait for a client are marked MUST run in a thread. Callback handlers, net event handlers and event handlers already run in one. Elsewhere, wrap the call inCreateThread.
Copies
Tables returned by UgCore are copies. Changing them changes nothing in UgCore. Calls through exports copy both ways.Typing
Every function is annotated for the Lua language server. Your editor shows parameters, return types and enum values, and flags typos such asUgCore.Players.Gt as errors.