Skip to content

Maintenance cleanup: JSON migration, inspection fixes, and dedupe helpers - #123

Merged
Zoriot merged 10 commits into
mainfrom
maintainence-cleanup
Oct 31, 2026
Merged

Zoriot merged 10 commits into
mainfrom
maintainence-cleanup

Conversation

@Zoriot

@Zoriot Zoriot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Migrate remaining json-simple usage to org.json, clear Paper/Canvas deprecations (including KML PDC), and make message rendering null-player safe for console/generator startup.
  • Extract shared helpers for stats accumulation, warp material items, palette chat/text, paginated menu chrome, and KML placement/material resolution; convert Region/QueuedRequest to records.
  • Harden GeneratorCollections unzip against zip-slip, fix Shadow .kotlin_module duplicate handling, and apply the remaining worthwhile inspection cleanups (typos, finals, inverted booleans, MenuItems switches).

Test plan

  • ./gradlew compileJava test
  • Spot-check KML paste → command block → place/undo still works
  • Open warp edit + block palette create/edit (name/description chat prompts)
  • Confirm GeneratorCollections download/extract still succeeds on a clean server
  • Smoke /btt / stats menu after JSON migration paths

Made with Cursor

Drop the duplicate JSON library so network APIs and stats use typed
org.json objects end-to-end.
Move KML command-block data to PersistentDataContainer, drop UnsafeValues
protocol checks, and switch menus/items off deprecated display APIs.
Generator startup notifies console without a player; fall back to the
default locale instead of NPEing in Messages.locale.
Let KotlinModuleMetadataTransformer see okhttp/okio/stdlib metadata
instead of dropping duplicates under the default EXCLUDE strategy.
…nd KML

Collapse duplicated accumulation, material-item, palette chat/text, selection chrome, and KML placement/material paths into shared helpers.
…direction helper

Use records for immutable holders and pull the yaw-to-schematic direction choice out of FieldScripts.
Normalize zip entry paths and reject extractions that escape the destination directory.
Fix typos, prefer positive boolean helpers, tighten finals, drop dead stubs, and modernize MenuItems switches from the inspection pass.
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

…essage

Look up CCA2 from the full region registry instead of only the team's owned regions, and stop messaging the player from that helper so ownership failures are reported once.
Avoid NPEs on null region country codes, treat blank Photon codes as missing so CCA2 enrichment runs, open warp edit menus on the main thread, rebuild the HTTP User-Agent per request, and parse Nominatim display names safely.
@Zoriot Zoriot added this to the Release v0.4.0 milestone Oct 31, 2026
@Zoriot
Zoriot merged commit b7774a5 into main Oct 31, 2026
4 checks passed
@Zoriot
Zoriot deleted the maintainence-cleanup branch October 31, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant