.. _appendix_scripts: Script Reference ================ Quick reference for script types and operators. For detailed explanations, see :ref:`Scripts `. .. contents:: :local: :depth: 2 Script Types ------------ Scripts are bound to triggers that determine when they execute. .. list-table:: :widths: 15 40 45 :header-rows: 1 * - Type - Trigger - Available Variables * - interact - Player right-clicks the bound block - ``player``, ``block`` * - walk - Player enters the space above the bound coordinates - ``player``, ``block`` * - ground - Player stands on the bound block (not jumping) - ``player``, ``block`` * - entity - Player right-clicks the bound entity - ``player``, ``entity`` * - area - Player enters the bound WorldGuard region - ``player``, ``region`` * - function - Called explicitly from other scripts - (parameters only) * - method - Called on an instance of a custom type - ``this``, (parameters) * - constructor - Called when creating an instance of a custom type - ``this``, (parameters) .. _appendix_scripts_script_operators: Script Operators ---------------- Every script line begins with an operator. Blank lines and lines starting with ``#`` are ignored. .. list-table:: :header-rows: 1 :class: operators-table * - Operator - Description * - ``@command `` - Execute a command with the player's permissions. * - ``@bypass `` - Execute a command with elevated (semi-admin) permissions. Most common. * - ``@console `` - Execute a command from the server console. Full permissions but no player context. * - ``@player `` - Send a message to the player. Supports ``&`` color codes and ``{{expr}}`` interpolation. * - ``@prompt