Skip to content

Fix Lands 8 team identity integration - #20

Open
GerwinVerkerk wants to merge 1 commit into
GroupeZ-dev:developfrom
UnitedFactions:fix/lands-8-ulid-integration
Open

Fix Lands 8 team identity integration#20
GerwinVerkerk wants to merge 1 commit into
GroupeZ-dev:developfrom
UnitedFactions:fix/lands-8-ulid-integration

Conversation

@GerwinVerkerk

Copy link
Copy Markdown

Problem

The Lands hook still compiles against LandsAPI 6.44.6 and calls Land#getId(). Lands 8 removed that numeric ID API, so the hook can load but throws NoSuchMethodError once team identity is evaluated during an active KoTH.

Solution

  • compile the hook against the public Lands 8 API artifact;
  • use the land ULID consistently for team identity and disband cleanup;
  • prefer a player's valid owned land, otherwise choose a deterministic valid land membership;
  • ignore deleted/admin lands and safely handle absent Lands/player state;
  • add focused regression tests for owned land, multi-membership, no valid land, and disband cleanup.

Using reflection to retain the removed numeric ID was considered, but rejected because it keeps the hook coupled to an obsolete implementation detail and cannot provide a stable Lands 8 contract.

Verification

  • ./gradlew --no-daemon :Hooks:Team-Lands:test — passed, 4 tests, 0 failures/skips
  • ./gradlew --no-daemon build — passed on Java 25
  • git diff --check — passed

Impact and risk

  • No command, permission, configuration, schema, or economy changes.
  • Lands team identifiers change from legacy numeric IDs to current ULIDs. Existing configured team-ID blacklists or externally stored results that contain old numeric Lands IDs need to be updated by server operators.
  • The hook remains optional; zKoth behavior without Lands is unchanged.
  • Real-player capture/contest behavior should still be verified by operators after activation.

Rollback

Revert this commit and restore the prior Lands API dependency. That rollback only supports pre-Lands-8 runtimes because the previous numeric ID call does not exist in Lands 8.

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