
Coder
Coder: A Powerful Minecraft Scripting Plugin, lightweight and features multi-language support (Python, Lua, Java | Jython, LuaJ, JVM).
Список изменений
Coder v2.4.5
The most powerful scripting engine for Minecraft. Run Java, Lua, and Python natively on your server with real-time web editing.
!Compatibility !Version
🚀 What's New in v2.4.5
-
New CoderAPI Addon Workers/Helpers:
- Added
CoderWorker, a lightweight helper/background-task interface that addons can expose viagetWorker()to run recurring logic without managing their own scheduler. AddonManagernow automatically starts an addon's worker right after the addon is registered (onLoad()/fireAddonLoad) and automatically stops it before the addon'sonDisable()runs — no manual bookkeeping required on the addon's side.- Workers can also be registered and managed by hand through
CoderAPIfor addons that want a worker independent of their own lifecycle:registerWorker(CoderWorker)– registers and immediately starts a worker, cancelling any prior task with the same name first.unregisterWorker(String name)– stops and removes a worker by name.getWorker(String name)/getWorkers()– look up a registered worker or view them all.isWorkerRunning(String name)– check whether a worker's scheduled task is still active.
- A
CoderWorkercontrols its own timing and threading viagetIntervalTicks(),getInitialDelayTicks(), andisAsync(), and getsonStart()/onStop()lifecycle hooks around its repeatingrun().
- Added
-
Expanded CoderAPI:
- Per-player cooldown system —
setCooldown(player, key, durationTicks),isOnCooldown(player, key),getRemainingCooldown(player, key),clearCooldown(player, key),clearAllCooldowns(player). Cooldowns are tracked per player UUID and per string key, so addons can run independent cooldowns (abilities, commands, kits, etc.) without colliding. - Block helpers —
getBlockType(location),setBlock(location, materialName),isBlockType(location, materialName),breakBlockNaturally(location)for quick block reads/writes from scripts and addons without touching Bukkit'sBlockAPI directly. - Chat/text helpers —
colorize(message)converts&-coded strings to usable§color codes, andstripColor(message)removes color codes entirely for logging, storage, or plain-text comparisons.
- Per-player cooldown system —
🛠 Features
Scripting Engine
- Native Multi-Language Support: Write and execute scripts in Java, Python, and Lua directly on your Minecraft server — no external processes or bridges.
- Unified Workspace: All scripts, regardless of language, live under a single organized
Coder/scripts/folder. - In-Memory Java Execution: Load Java code directly into server memory (
/coder load) so listeners and background processes defined in scripts keep running like a normal plugin component, without needing a restart. - Clean Cache Directory: Compiled
.classfiles are cleanly separated:- Temporary runtime files:
Coder/JavaClass/Runtime/ - Loaded persistent files:
Coder/JavaClass/Loaded/
- Temporary runtime files:
- User Execution Control (UEC): An active security layer that intercepts unauthorized scripts before they run. Regardless of language, nothing executes without UEC verification — operators can
/coder confirmor/coder cancelflagged scripts.
Addon System (CoderAPI)
- Addon Registry: Any plugin can hook into Coder as an addon by implementing
CoderAddonand either depending/soft-depending onCoderor matching the legacyme.coder.apiclasspath (with an automatic warning nudging authors toward the currentdev.codestuff.coder.apipath). - Version & Dependency Gating:
AddonManagerchecks each addon's declaredgetMinCoderVersion()and inter-addongetDependencies()before loading, skipping (with a clear log warning) anything that isn't satisfied. - Workers/Helpers: Addons can expose a
CoderWorker(see above) for recurring background work that's fully managed byAddonManager— started on load, stopped on unload, sync or async. - Custom Execution Handlers: Addons can register their own
JavaExecutionHandlerand/orScriptExecutionHandlerimplementations for Java, Python, and Lua, plus per-languageScriptPreprocessor/ScriptPostprocessorhooks. - Custom Commands, Events & Tab Completion: Addons can register subcommands (
CoderCommandHandler), listen to Coder's own lifecycle events (CoderEventListener— script start/end/error, addon load/unload, command execution), and contribute tab completion (CoderTabCompleter). - Shared Data Store: A per-addon key/value store (
setAddonData/getAddonData/getAllAddonData) for lightweight state that doesn't need its own file. - Auto-Tick & Auto-Save: Addons can opt into a per-tick callback (
wantsTick()/onTick()) or a periodic autosave (shouldAutoSave()/getAutoSaveInterval()/onSave()), both scheduled automatically byAddonManager.
Utilities Exposed via CoderAPI
- Messaging: Prefixed success/error/info/warning/debug messages and broadcasts to all online players plus console.
- Players: Health, food, level/exp, game mode, permissions, teleporting, kicking, and location/world lookups.
- Inventory/Items: Give, remove, count, and check items by material name, plus full inventory clearing.
- Effects: Sounds, particles, action bars, and titles.
- Scoreboard: Simple sidebar creation and clearing.
- Scheduler: Sync, delayed, async, and repeating task helpers wrapped around Bukkit's scheduler.
- Cooldowns, Blocks, and Chat helpers: See "What's New" above.
- Server Info: MOTD, Bukkit/Minecraft version, TPS, MSPT, tick count, and plugin lookups.
Operations
- Dual Backup Systems: Automated scheduled backups paired with instant manual snapshots (
/coder backup,/coder auto-backup-start/stop). - Graphical Web Interface (GWI): Securely manage, edit, and delete files on your server from a remote web browser.
- Virtual Console Interface (VCI): Run server commands remotely and securely via
https://coder-gwieditor.firesmasher.workers.dev/mc-console?=YOUR_TOKEN_HERE. - Java 25 Support: A dedicated java-25 build is available for servers running newer JVMs.
- Extra Useful Utilities: Script access to JetBrains annotations, NBT-API, and Commons Lang3, among others.
🛡 GWI Editor Security
The remote GWI Editor is highly secure. Session connections leverage SHA-256 tokens which are mathematically impossible to brute-force or guess. Every session token also automatically expires after 30 minutes of inactivity.
🛡 Virtual Console Interface Security
The custom Minecraft console panel blocks /op commands and is secured by SHA-256 server password tokens. To disable this feature, go to /plugins/Coder/.gwi/secure/serverPassword.env and remove the value of serverPassword=.
📖 Quick Start
Workspace Directories
Drop your scripts and check execution logs in the following directories:
| Purpose | Server Path |
|---|---|
| Scripts Directory | /plugins/Coder/scripts/ |
| Execution Logs | /plugins/Coder/Logs/ |
| GWI Directory | /plugins/Coder/.gwi/ |
Command Reference
Script Management
/coder run <filename>– Executes a specified script./coder load <filename>– Loads and compiles a script directly into Server Memory./coder unload <filename>– Unloads an active script from Server Memory./coder reload <filename>– Reloads a specific script's configuration.
Security & UEC
/coder confirm– Manually permits a script flagged by the User Execution Control./coder cancel– Blocks and cancels a script caught by the UEC.
GWI Web Editor
/coder editor start– Spawns a secure SHA-256 link to access the GWI Web Editor./coder editor trust <username>– Grants access to a pending connection request./coder editor do-not-trust <username>– Denies access to a connection request./coder editor stop– Terminates the active GWI Web Editor session immediately.
Virtual Console Interface
/coder gen-pass- Generates a unique SHA-256 server password to access/mc-console/.
System & Maintenance
/coder backup– Triggers an immediate manual backup of your script directory./coder auto-backup-start– Starts the automated scheduler for background backups./coder auto-backup-stop– Halts the background backup scheduler./coder reload-config– Hot-reloads the mainconfig.ymlfile./coder update– Checks for updates and retrieves a download link./coder update-jar– Automatically downloads and replaces the plugin JAR file./coder enable-activity-logging– Enables activity logging./coder disable-activity-logging– Disables activity logging.
Coderc (Coder Compiler)
/coderc run <filename.class>- Runs a .class file./coderc compile <filename.java>- Compiles a .java into .class- Aliases:
/cojav, /cjavac, /cjava, /codec
