| 简体中文 | English |
This is a personal project: an English-learning plugin for Minecraft servers (Paper family, Java 21, GPL-3.0-only), built by a high-school first-year student with AI assistance (vibe coding) and ground down bit by bit on a real server.
Three honest facts up front, so your time is not wasted:
If you can accept those three points, read on.
Search the Issues first
(closed ones included) — a question like “/le does nothing” or “AI never replies” has likely been asked before.
Please include all five of these in a bug report; missing one usually costs an extra round trip:
Paper 1.21.11 build 132, Purpur 1.21.4 build 2321)/lea info, or the jar filename; formatted like 1.0.7)Let.s.Learn.English.-<version>.jar (Java 21+)Let.s.Learn.English.-<version>-mc26.jar (Java 25+)The standard build on 26.x gives Unsupported class file major version, and vice versa. See the JAR table in the README.
Relevant logs. The fastest way is in-game:
/lea diagnose save
It writes a self-check (config, database, dependencies, permissions) to
plugins/LetsLearnEnglish/exports/diagnose-<timestamp>.txt and echoes the path in chat, ready
to paste. If there is a stack trace, paste it in full.
If a number looks wrong, also say “I expected X, it shows Y” — the value you expected is often more useful than the log.
Before pasting, remove these: ai_config.yml’s api-key, tts.voicerss-api-key,
proxy.inbound-secret, statistics-server.auth.password, and any player names.
main (e.g. fix/wrongbook-holder-guard), and keep the change focused — one PR, one thing.main and fill in the description and testing notes per the PR template..github/workflows/build.yml) runs mvn verify plus static gates automatically; PRs with failing CI will not be merged.You need JDK 21 and Maven 3.9+ (no Maven Wrapper in this repo — use your installed mvn).
Run from the repository root (where pom.xml lives):
mvn verify # full validation: compile + tests + JaCoCo coverage gate (the standard command)
mvn clean package # package into target/
mvn clean package -DskipTests # quick package skipping tests — do not use this to validate a change
mvn test # run tests only
Building the 26.x jar additionally needs JDK 25:
mvn clean package -Pmc26 # produces target/Let's Learn English!-<version>-mc26.jar
net.kyori components, Server#getMinecraftVersion).
Changes must be consistent with this fact.mvn verify is not the same as mvn package: jacoco:check is bound to the verify phase, so
packaging with -DskipTests also bypasses the coverage gate.mvn clean package or mvn verify must compile successfully.If you get invalid target release: 21, your JAVA_HOME points at an older JDK. Set it explicitly:
export JAVA_HOME=/path/to/jdk-21
README.md and
README-EN.md accordingly, and append a one-line entry under [Unreleased] in CHANGELOG.md.The repo ships several gates. CI runs them and you can run them locally — please run at least these after a change:
node scripts/audit-i18n-keys.js # i18n keys referenced in code must exist in both zh.yml and en.yml
node scripts/gen-words.js check src/main/resources/words/beginner.yml # word-bank structure check
node scripts/gen-words.js check src/main/resources/words/intermediate.yml
node scripts/gen-words.js check src/main/resources/words/advanced.yml
node scripts/check-word-collisions.js # definition-collision scan (advisory, not blocking yet)
gen-words.js checkaccepts one file argument; extra arguments are silently ignored, so loop over the files.
Tests matter more than the code change itself. Every fix in this project is required to come with an assertion that goes red before the fix — otherwise it is not fixed, just edited. If you can show that your test actually catches the bug, your PR is very likely to land.
This rule is not fussiness: several tests in this repo once passed both before and after a change, and only mutation checking revealed they were asserting on a framework stub instead of their own logic. The usual false-green shapes are self-proving stubs, untouched gates, a mismatched exception type standing in for the real one, half coverage, and a count satisfied by a different code path. “I added a test” is not evidence; “I broke this line and the test went red” is.
src/main/resources/messages/{zh,en}.yml, and the two files must keep an identical key set
(checked by audit-i18n-keys.js).gen-words.js check after editing.type(scope): what changed and why. Keep the “why” — it is the only part that survives three months.
fix(wrongbook): async back-fill reopens the GUI after the player closes it with ESC
The back-fill only had isOnline + token guards; it was missing "the player closed the
inventory but is still online". When data arrived, the openInventory call at the end of
render reopened the inventory the player had just closed. The guard now compares
PluginGuiHolder by reference instead of comparing titles.
This project is released under GPL-3.0-only (see LICENSE). By submitting a pull
request you agree to license your contribution under the same terms. If you contribute on behalf of
someone else (e.g. your employer), make sure you are authorized to do so.
There is no CLA: your contribution remains your copyright, licensed under GPL-3.0-only.