Skip to content

Expose and filter player-kill victims in the typed API - #1062

Open
strobil wants to merge 1 commit into
PlayPro:masterfrom
Vanilla-Game:codex/entity-victim-api
Open

strobil wants to merge 1 commit into
PlayPro:masterfrom
Vanilla-Game:codex/entity-victim-api

Conversation

@strobil

@strobil strobil commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

entityLookup() exposes the actor and entity type but drops the victim ID already stored in block.data for player kills. A caller therefore cannot query which player was killed or page through kills of a particular victim.

This adds EntityResult.getVictim() and LookupOptions.victims() / excludeVictims(). Victim filters are applied in SQL before pagination and combine with existing actor, time, location and entity filters. For example, .users(List.of("Killer")).victims(List.of("Victim")) selects kills of Victim by Killer.

The existing result constructor remains available. Mob kills, spawns and unresolvable victim IDs return a null victim; exclusions retain those events. Unknown inclusion names match nothing, names are resolved through the existing case-insensitive user lookup, and no users or history records are created. No schema or logging configuration changes are needed. API documentation and regression tests are included.

Validation:

  • Java 25: mvn -q -DskipTests=false verify passed; 14 tests passed using real SQLite and DuckDB JDBC databases.
  • Isolated MySQL 8.4.11: 8 checks passed, including actor/victim filtering, pagination and null/invalid records.
  • Isolated ClickHouse 26.8.37.168: 16 SQL-level checks passed against nullable columns and signed/unsigned ID types. This was not a full ClickHouse plugin/API integration run.

Refs #1061.

@netlify

netlify Bot commented Nov 15, 2026

Copy link
Copy Markdown

👷 Deploy request for coreprotect pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ed64f90

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T16:05:21.385023Z
We couldn’t complete this review. Comment @codex review to try again.
ed64f90 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 medium · 1 minor

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
CodeStyle 1 minor
Complexity 1 medium

View in Codacy

🟢 Metrics 124 complexity · 7 duplication

Metric Results
Complexity 124
Duplication 7

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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