Skip to content

Diagnostic Codes

Navigation: Documentation Home · Contents · Diagnostics & Troubleshooting · FAQ · Glossary · Module System

This page collects the status codes and error codes for each QinhCoreLib (QCL) subsystem, grouped by subsystem. Each code lists its meaning, the triggering scenario, and a handling suggestion.

These codes appear in three places:

LocationWho produces itHow you see it
The diagnostic lines of /qcl status / /qcl status detailEach diagnostic checker (DiagnosticResult.code)Run the command in-game or in the console
Developer API return valuesResolveResult.code (items), ScriptExecutionResult.code (scripts), EconomyTransactionResult.code (economy)Read the return object in code
Console logsStartup probe / each bridgeServer log file

🧱 Two-layer status: enabled vs available

Before reading codes, first understand the two-layer status QCL distinguishes for "modules" and "bridges" (/qcl status detail shows both):

DimensionFieldMeaningDetermined by
Enabled / Not enabledenabledWhether this module/bridge is switched onThe modules.* toggles in config.yml + whether load()/enable() succeeded
Available / UnavailableavailableWhether it can actually work at runtimeWhether the corresponding soft dependency is installed and ready at runtime

A bridge can be "enabled but unavailable" (the toggle is on, but the corresponding plugin is not installed → NO_HOOK), or "not enabled" (turned off by modules.*). When troubleshooting, first figure out which layer you're at. See Module System for details.


❤️ Health codes (HealthReport / bridge status)

HealthReport.code, also the value shown under "health code / module health / each bridge health" in /qcl status.

CodeMeaningTriggering scenarioHandling suggestion
OKNormalThe module/bridge is hooked and running normallyNo action needed
NO_HOOKNo soft-dependency hookThe corresponding external plugin is not installed; the bridge skips by designThis is normal graceful degradation; install the corresponding plugin when you need that capability
DEGRADEDDegraded (recoverable)The corresponding plugin is installed but operation is impaired (API changes, version mismatch, etc.)Check message / suggestion, then /qcl reload or restart after fixing

⚠️ NO_HOOK is not an error; it is the normal state of "the soft dependency is not installed". Only DEGRADED needs attention. On a brand-new server with no soft dependencies installed, it is completely normal for /qcl status to show many NO_HOOK entries.


📦 Item resolution codes (ItemSource)

Returned by item reference resolution via ItemSourceManager.parseItemReference; also the ResolveResult.code of the developer API ItemManagerAPI.resolve(...).

CodeMeaningTriggering scenarioHandling suggestion
OKResolution succeededThe reference is valid and the item has been builtNo action needed
PARSE_FAILEDReference string parse failedMalformed reference format (empty string, illegal separator, etc.)Verify the reference format, see Item Source References
MATERIAL_NOT_FOUNDVanilla material not foundThe vanilla: material name is misspelled or doesn't exist in this versionCheck the spelling of the Material enum name (all uppercase)
SOURCE_NOT_FOUNDItem source not foundThe source the reference points to is not registered (the corresponding plugin is not installed/enabled)Install the corresponding item source plugin, or use a different source
MODULE_BUILD_FAILEDModule build failedThe item source module threw an error while building the itemCheck the logs and verify whether the source's own configuration is valid
ITEM_NOT_FOUNDItem not foundThis ID does not exist in that sourceVerify whether the item ID actually exists in the corresponding source

🔎 The "item reference diagnostic" at the end of /qcl status uses vanilla:stone as a self-check—if it returns OK, the item source resolution chain itself is healthy. To troubleshoot a specific reference failure, use ItemManagerAPI.diagnose(ref, player) separately. See Item API for details.


📜 Script error codes (JavaScript / GraalVM)

ScriptExecutionResult.code, returned by script execution (GUI conditions/actions, API calls).

CodeMeaningTriggering scenarioHandling suggestion
SCRIPT_UNAVAILABLEScript subsystem unavailableThe GraalJS runtime is missing (usually plain Spigot didn't pull in the library), or javascript.enabled=falseUse Paper/Purpur; check config javascript.enabled
SCRIPT_PARSE_FAILEDReference string parse failedMalformed script reference format (not namespace:path.js[:functionName])Fix the reference format
SCRIPT_NOT_FOUNDScript file not foundThe specified script file does not existVerify the script's directory and path
SCRIPT_FUNCTION_MISSINGFunction missingThe target function does not exist in the scriptCheck the function name, or config javascript.default-function
SCRIPT_FAILEDExecution failedThe script threw an exception at runtimeEnable javascript.debug.print-stacktrace to see the stack trace

See Scripting Quickstart and Script API for details.


💰 Economy codes (Economy)

EconomyTransactionResult.code, returned by economy operations (query/deposit/withdraw/set).

CodeMeaningTriggering scenarioHandling suggestion
OKSuccessThe economy operation completedNo action needed
CURRENCY_REQUIREDA currency must be specifiedUsing ExcellentEconomy but no currency was specified and there is no defaultSet economy.default-currency, or pass the currency explicitly in the call/action
INSUFFICIENT_FUNDSInsufficient balanceThe player doesn't have enough funds (common with take_money)A normal business result; prompt the player as needed
NO_PROVIDERNo economy providerNo economy plugin is installed, or the specified provider is not registeredInstall an economy plugin and configure economy.default-provider

EconomyDiagnostics (economy diagnostics)

Used by the economy bridge diagnostics of /qcl status and the developer diagnostic API.

CodeMeaningTriggering scenarioHandling suggestion
ECONOMY_UNAVAILABLEEconomy unavailable overallThe economy subsystem has no usable backendCheck whether Vault/ExcellentEconomy/PlayerPoints is installed and enabled
ECONOMY_PROVIDER_MISSINGProvider missingThe specified provider is not registeredVerify economy.default-provider, or confirm that backend plugin is installed
ECONOMY_CURRENCY_MISSINGCurrency missingThe specified/default currency does not exist in ExcellentEconomyConfigure economy.default-currency or verify the currency ID (money/silver/gold…)

See Economy Actions, Economy Plugins, and Economy API for details.


🧰 DiagnosticResult fields (developer)

All diagnostic results are carried uniformly in the DiagnosticResult<T> container; understanding the fields helps you read the status:

FieldTypeMeaning
successBooleanWhether this diagnostic succeeded
valueT?The data attached to the diagnostic (e.g. the resolved item, the list of bridge statuses)
codeStringThe status code (i.e. the codes in the tables above)
messageStringHuman-readable message
sourceStringThe diagnostic source (module/bridge name)
recoverableBooleanWhether it is recoverable (DEGRADED-type is generally true)
suggestionStringFix suggestion
traceIdStringTrace ID, for correlating logs

Construct with the companion methods DiagnosticResult.ok(...) / DiagnosticResult.fail(...). See Module System · Diagnostic Model for details.


CommandAliasPermissionDescription
/qcl statusprobeqcl.statusStatus summary
/qcl status detailfullqcl.statusFull status (per-module/per-bridge + script extension lines)
/qcl reloadrlqcl.adminReload config/economy/scripts/external item modules/GUI

Continue reading