Skip to content

Configuration and Performance

CraftingEngine stores its global operational configuration in plugins/CraftingEngine/config.yml. This document covers all available configuration settings, runtime performance tuning, language modes, and subsystem hot-reloading.


1. Complete config.yml Reference

config-version: 1
plugin:
debug: false
runtime:
tick-interval: 1
definitions:
directory: "processes"
verbose-hot-reload: true
language:
default-language: "en_US"
mode: "per_player"
scripting:
sandbox-mode: "STRICT"
execution-timeout-ms: 50
max-instructions: 10000
presets-directory: "presets/scripts"
resources:
auto-generate-defaults: true
categories:
processes: true
stations: true
capabilities: true
presets: true
scripts: true
menus: true
languages: true

Configuration Keys & Descriptions

Setting PathTypeDefaultDescriptionReload Command
config-versionInteger1Schema version tag. Do not modify manually.None
plugin.debugBooleanfalseEnables detailed debug and trace logs in console./cfe reload config
runtime.tick-intervalLong1Server tick frequency of the main process ticker loop (1 tick = 50ms at 20 TPS)./cfe reload config
definitions.directoryString"processes"Directory relative to plugin root where blueprint YAMLs reside./cfe reload processes
definitions.verbose-hot-reloadBooleantruePrints detailed per-file diagnostic load logs during reloads./cfe reload processes
language.default-languageString"en_US"Fallback language bundle loaded from plugins/CraftingEngine/lang/./cfe reload languages
language.modeString"per_player"per_player (uses player client locale) or fixed (forces default-language)./cfe reload languages
scripting.sandbox-modeString"STRICT"STRICT (secure sandboxed execution) or FULL_ACCESS (allows Java reflection)./cfe reload scripts
scripting.execution-timeout-msLong50Maximum wall-clock time in milliseconds before the watchdog interrupts Lua scripts./cfe reload scripts
scripting.max-instructionsLong10000Instruction budget per Lua script invocation to prevent infinite loops./cfe reload scripts
scripting.presets-directoryString"presets/scripts"Directory relative to plugin root containing reusable .lua script files./cfe reload scripts
resources.auto-generate-defaultsBooleantrueMaster switch controlling automatic extraction of missing bundled sample files.Boot Only

2. Performance Tuning

CraftingEngine is architected for zero-tick overhead and high player concurrency:

Ticker Rate (runtime.tick-interval)

  • Default (1 tick): Processes evaluate every server tick (50ms). Best for responsive animations, fast minigames, and smooth hologram progress bars.
  • Optimized (2 ticks): Evaluates every 100ms. Reduces main thread CPU load by up to 50% on massive servers with hundreds of concurrent active crafting stations.

Lua Script Watchdog

Custom Lua condition and action scripts execute in an isolated environment. The watchdog settings guarantee server stability:

  • execution-timeout-ms: 50: Prevents complex calculations from lagging server ticks.
  • max-instructions: 10000: Aborts scripts executing unbounded loops (while true do).

Virtual Display Entities & PacketEvents

Ghost block previews on multiblocks and virtual item display animations do not spawn physical Bukkit entities in the world chunk. They are streamed as synthetic client-side packets via PacketEvents, eliminating entity tracking overhead, chunk saving strain, and ghost entity persistence leaks.


3. Subsystem Hot-Reloading

CraftingEngine provides granular hot-reloading via /cfe reload:

Ventana de terminal
/cfe reload all # Reload all configuration, processes, stations, and menus
/cfe reload config # Reload global config.yml
/cfe reload processes # Reload process blueprints and recipes
/cfe reload stations # Reload workstation definitions and multiblocks
/cfe reload capabilities # Reload capability declarations
/cfe reload menus # Reload 9xN GUI matrix templates
/cfe reload animations # Reload virtual animation presets
/cfe reload scripts # Reload Lua scripts and clear cache
/cfe reload languages # Reload i18n translation bundles

All reloads are non-destructive: active processes continue executing, and player inventories remain protected during the reload phase.