Skip to content

Dev v1.1.1#12

Merged
3add merged 30 commits into
mainfrom
dev
May 15, 2026
Merged

Dev v1.1.1#12
3add merged 30 commits into
mainfrom
dev

Conversation

@3add
Copy link
Copy Markdown
Owner

@3add 3add commented May 15, 2026

Summary by CodeRabbit

  • New Features

    • Added a packet-type property expression for Skript
    • Skript packet events may now specify listener priority
  • Bug Fixes

    • Prevented null-related errors during packet handling
    • Disallowed modifications when using monitor priority
  • Documentation

    • Version bumped to 1.1.1
    • Updated compatibility: Paper 1.21.10+, Skript 2.15.0+, SkBee 1.17.2+
  • Chores

    • Added CI build and code-quality workflows
    • Improved debug output and plugin metadata/configuration

Review Change Stack

3add added 21 commits May 14, 2026 21:06
fix: PacketSendOrReceiveEvent always returning true for canExecuteAsynchronously
…vent causing major player ping issues and netty channels being occupied.
fix: packet priority syntax conflict with StructEvent
fix: allowing non-MONITOR priority for async and sync
fix: ExprPacketField working for non-netty processed events
fix: ExprPacketField and EffCancelPacket allowing alteration/cancellation of a MONITOR priority event
add: listening to all packets for the on packet event
add: property expr packet's packettype
…pt for re-encoding all events (packetevents does this by default anyway unless the setting is disabled)
refactor: use paper-plugin instead of plugin
bump: version of SKR
Copilot AI review requested due to automatic review settings May 15, 2026 21:01
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a43373f4-d154-4438-8f4b-df9f2431c8f3

📥 Commits

Reviewing files that changed from the base of the PR and between e5db462 and 02028cb.

📒 Files selected for processing (1)
  • src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketField.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketField.java

📝 Walkthrough

Walkthrough

This PR upgrades PacketEventsSK to v1.1.1: adds PacketListenerPriority routing across packet events and listeners, replaces static EventPacketMapper with reflective wrapper construction, migrates plugin metadata to Paper descriptor, introduces CI/JDK tooling and Qodana config, adds a packet-type expression and Skript priority parsing, and expands debug output depth.

Changes

Build Infrastructure, CI, and Plugin Configuration

Layer / File(s) Summary
Build versioning and CI workflows
build.gradle.kts, .github/workflows/gradle-build.yml, .github/workflows/qodana_code_quality.yml
Gradle script introduces projectVersion, serverVersion, and apiVersion; bumps SkBee/SkriptRegistration versions; consolidates task/toolchain settings; adds a Gradle dev build workflow and a Qodana code-quality workflow configured for JDK 25.
Qodana static analysis configuration
qodana.yaml
Qodana YAML added specifying projectJDK: 25, qodana.starter profile, and the JetBrains JVM linter image.
Plugin descriptor migration and configuration
src/main/resources/paper-plugin.yml, src/main/resources/config.yml, README.md
Plugin descriptor moved to paper-plugin.yml with version placeholders and explicit dependency ordering; config.yml header updated to v1.1.1; README versions note broadened for Paper/Skript/SkBee.

Packet Event Priority System and Core Refactoring

Layer / File(s) Summary
Packet event data model with priority support
src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveEvent.java
PacketSendOrReceiveEvent and nested Netty/Sync/Async event constructors now accept and store PacketListenerPriority; getPriority() exposed.
Priority-aware listener registration and dispatch
src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveListener.java
Listener registry refactored to per-priority instances and maps; registerListener gains a priority param; trigger dispatches per-priority and constructs wrappers via PacketTypeCommon#getWrapperClass() reflection.
Packet type registry and constructor registry updates
src/main/java/dev/threeadd/packeteventssk/api/general/PacketTypeRegistry.java, src/main/java/dev/threeadd/packeteventssk/api/general/PacketConstructorRegistry.java
PacketTypeRegistry exposes a frozen combined PACKETS list and getAllPackets(); PacketConstructorRegistry adds SELECT_BUNDLE_ITEM packet registration and small builder param naming fixes.
Entity, skin, and plugin wiring adjustments
src/main/java/dev/threeadd/packeteventssk/api/general/EntityTracker.java, src/main/java/dev/threeadd/packeteventssk/api/simple/PlayerSkinManager.java, src/main/java/dev/threeadd/packeteventssk/PacketEventsSK.java
EntityTracker guards against null UUIDs on disconnect and uses explicit lambda param naming; PlayerSkinManager uses explicit lambda param naming; PacketEventsSK no longer registers PacketSendOrReceiveListener in onLoad.

Skript Elements and Expressions with Priority Support

Layer / File(s) Summary
Packet event parsing with priority support
src/main/java/dev/threeadd/packeteventssk/element/general/event/EvtPacketSendOrReceive.java
EvtPacketSendOrReceive parses optional listener priorities in event patterns, enforces sync/async constraints, stores parsed priority in parser data, registers listeners with priority, and filters runtime events by priority.
Packet field and type expressions with priority validation
src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketField.java, src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketPacketType.java, src/main/java/dev/threeadd/packeteventssk/element/general/GeneralElementRegistration.java
ExprPacketField now detects listening context via event type and rejects SET changes unless process type is NETTY and priority is not MONITOR; new ExprPacketPacketType exposes a packet's PacketTypeCommon; GeneralElementRegistration registers the new expression.
Effect registration and type syntax updates
src/main/java/dev/threeadd/packeteventssk/element/general/effect/EffCancelPacket.java, src/main/java/dev/threeadd/packeteventssk/element/general/effect/EffSendOrReceivePacket.java, src/main/java/dev/threeadd/packeteventssk/element/general/Types.java
EffCancelPacket disallows cancelling/modifying packets when priority is MONITOR; EffSendOrReceivePacket skips targets whose User cannot be resolved; Types.java updates pluralization and uses PacketTypeRegistry.getAllPackets() as supplier.

Debug Utilities Enhancement

Layer / File(s) Summary
Enhanced debug string generation
src/main/java/dev/threeadd/packeteventssk/api/util/DebugUtil.java
DebugUtil increases recursion depth to 5, skips @Deprecated methods, rewrites value expansion to uniformly handle null, Optional, Map, Iterable and arrays (including arrays via reflection), detects metadata-like lists, and recursively expands nested objects; isSimpleValue tightened and arrays formatted in valueToString.

🎯 3 (Moderate) | ⏱️ ~25 minutes

A rabbit hops through priorities and packets,
Building workflows with Qodana's blankets,
Reflections now catch what mappers once knew,
The paper-plugin.yml sings v1.1.1 true,
Debug trails deepen, the system's brand new! 🐰✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 1.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Dev v1.1.1' is vague and does not meaningfully describe the specific changes in the pull request, such as adding GitHub Actions workflows, refactoring packet event handling, or updating dependencies. Use a more descriptive title that summarizes the main changes, such as 'Add GitHub Actions workflows and refactor packet event handling with priority support' or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@3add 3add requested a review from Copilot May 15, 2026 21:05
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (1)
src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveListener.java (1)

115-120: ⚡ Quick win

Preserve the reflection failure cause in thrown exceptions.

Line 117 and Line 120 throw new IllegalStateException without attaching the original exception, which makes wrapper-constructor failures hard to debug.

Proposed fix
-        } catch (InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodError |
-                 NoSuchMethodException e) {
-            throw new IllegalStateException("Couldn't create packet for: " + type);
+        } catch (InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodError |
+                 NoSuchMethodException e) {
+            throw new IllegalStateException("Couldn't create packet for: " + type, e);
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveListener.java`
around lines 115 - 120, The thrown IllegalStateExceptions lose the original
reflection failure cause; update the try/catch in PacketSendOrReceiveListener so
that the catch block rethrows using the caught exception as the cause (e.g., new
IllegalStateException("Couldn't create packet for: " + type, e)), and if you
need a fallback throw after the try/catch, capture the caught exception into a
local Throwable (e.g., lastFailure) inside the catch and use that as the cause
in the final throw to preserve the root cause from
InvocationTargetException/InstantiationException/IllegalAccessException/NoSuchMethodError/NoSuchMethodException.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/qodana_code_quality.yml:
- Around line 18-22: The workflow currently grants overly broad repo permissions
by setting permissions.contents to write; since the job uses push-fixes: 'none',
change permissions.contents from write to read to follow least privilege. Update
the permissions block (permissions.contents) in
.github/workflows/qodana_code_quality.yml to use read instead of write and keep
pull-requests and checks permissions as-is; confirm there are no other steps
that require contents: write before committing the change.
- Around line 9-10: The qodana job unconditionally reads secrets.QODANA_TOKEN
which fails for forked PRs because GitHub doesn't expose secrets; update the
qodana job (job name "qodana") to include a job-level guard that prevents
running on forked pull requests, e.g. add an if condition that only allows the
job when the PR comes from the same repository (e.g. if: github.event_name !=
'pull_request' || github.event.pull_request.head.repo.full_name ==
github.repository) so the job won't attempt to access secrets.QODANA_TOKEN for
forks.

In `@build.gradle.kts`:
- Line 36: Replace the dynamic version selector so the build is pinning an exact
Paper dev bundle: locate the call to
paperweight.paperDevBundle("$serverVersion.build.+") and change it to use a
concrete build number (e.g.,
paperweight.paperDevBundle("$serverVersion.build.<BUILD_NUMBER>")) so it no
longer uses the '+' wildcard; update any variable or constant that supplies the
build number accordingly and document the chosen build number in the file or
project docs for reproducibility.
- Around line 68-70: The build currently sets
sourceCompatibility/targetCompatibility to "21" in the compileJava block but
other JVM metadata (lines declaring Java 25) are still targeting Java 25; update
the compile tasks to use options.release = 21 and unify all JVM
toolchain/metadata settings to Java 21 so compile-time and generated metadata
match. Specifically, replace/augment usage of
sourceCompatibility/targetCompatibility in the compileJava (and compileTestJava
if present) configuration with options.release = 21, ensure any javaToolchains
or compileKotlin/compileTestKotlin targets also specify Java 21, and remove or
change any lingering references to Java 25 so all produced class metadata and
dependency selection use Java 21.

In
`@src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveListener.java`:
- Around line 43-47: The current containsKey + put sequence on the
ConcurrentHashMap INSTANCES can race and register duplicate listeners; replace
that pattern with an atomic computeIfAbsent on INSTANCES to create and store a
PacketSendOrReceiveListener for the given priority only once, and call
PacketEvents.getAPI().getEventManager().registerListener(...) only when
computeIfAbsent created the new listener (use the returned instance to determine
whether registration is needed).

In
`@src/main/java/dev/threeadd/packeteventssk/api/general/PacketTypeRegistry.java`:
- Around line 15-16: The code caches a single Iterator instance in
PACKETS_ITERATOR which is consumed on first use and causes subsequent
getAllPacketsIterator() callers to get empty/partial results; change the
implementation so PACKETS_ITERATOR is not a shared, static consumed
iterator—instead create and return a fresh iterator (or use an unmodifiable
Collection/stream) each time getAllPacketsIterator() is called, e.g. iterate
over the underlying packet collection of PacketTypeCommon entries within
PacketTypeRegistry and construct a new Iterator for every call rather than
reusing the PACKETS_ITERATOR field.

In
`@src/main/java/dev/threeadd/packeteventssk/element/general/effect/EffCancelPacket.java`:
- Around line 51-53: The init check in EffCancelPacket currently uses "if
(data.getPriority() != PacketListenerPriority.MONITOR)" which wrongly rejects
all priorities except MONITOR; change it to check equality so MONITOR is
rejected: in the EffCancelPacket init method (the block referencing
data.getPriority() and Skript.error), replace the condition with
"data.getPriority() == PacketListenerPriority.MONITOR" and keep the Skript.error
and return false to block MONITOR only.

In
`@src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketField.java`:
- Around line 119-127: The guard that prevents altering packets only runs when
data.getPacketType() != null, letting "on any packet" bypass NETTY and MONITOR
checks; in ExprPacketField adjust the conditional so the checks against
data.getProcessType() and data.getPriority() (calls to data.getProcessType(),
EvtPacketSendOrReceive.ProcessType.NETTY, and PacketListenerPriority.MONITOR and
the Skript.error calls) run for all packet events (remove or move the packetType
!= null gate) so SET cannot bypass the NETTY/MONITOR protections for "on any
packet".

---

Nitpick comments:
In
`@src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveListener.java`:
- Around line 115-120: The thrown IllegalStateExceptions lose the original
reflection failure cause; update the try/catch in PacketSendOrReceiveListener so
that the catch block rethrows using the caught exception as the cause (e.g., new
IllegalStateException("Couldn't create packet for: " + type, e)), and if you
need a fallback throw after the try/catch, capture the caught exception into a
local Throwable (e.g., lastFailure) inside the catch and use that as the cause
in the final throw to preserve the root cause from
InvocationTargetException/InstantiationException/IllegalAccessException/NoSuchMethodError/NoSuchMethodException.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8238f2a2-87d4-416e-ac85-02a4368d6de1

📥 Commits

Reviewing files that changed from the base of the PR and between 3941d68 and b8c59a5.

📒 Files selected for processing (24)
  • .github/workflows/gradle-build.yml
  • .github/workflows/qodana_code_quality.yml
  • README.md
  • build.gradle.kts
  • qodana.yaml
  • src/main/java/dev/threeadd/packeteventssk/PacketEventsSK.java
  • src/main/java/dev/threeadd/packeteventssk/api/general/EntityTracker.java
  • src/main/java/dev/threeadd/packeteventssk/api/general/EventPacketMapper.java
  • src/main/java/dev/threeadd/packeteventssk/api/general/PacketConstructorRegistry.java
  • src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveEvent.java
  • src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveListener.java
  • src/main/java/dev/threeadd/packeteventssk/api/general/PacketTypeRegistry.java
  • src/main/java/dev/threeadd/packeteventssk/api/simple/PlayerSkinManager.java
  • src/main/java/dev/threeadd/packeteventssk/api/util/DebugUtil.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/GeneralElementRegistration.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/Types.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/effect/EffCancelPacket.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/effect/EffSendOrReceivePacket.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/event/EvtPacketSendOrReceive.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketField.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketPacketType.java
  • src/main/resources/config.yml
  • src/main/resources/paper-plugin.yml
  • src/main/resources/plugin.yml
💤 Files with no reviewable changes (3)
  • src/main/java/dev/threeadd/packeteventssk/api/general/EventPacketMapper.java
  • src/main/resources/plugin.yml
  • src/main/java/dev/threeadd/packeteventssk/PacketEventsSK.java

Comment thread .github/workflows/qodana_code_quality.yml
Comment thread .github/workflows/qodana_code_quality.yml
Comment thread build.gradle.kts
Comment thread build.gradle.kts
Comment thread src/main/java/dev/threeadd/packeteventssk/api/general/PacketTypeRegistry.java Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

Qodana for JVM

6 new problems were found

Inspection name Severity Problems
Constant values 🔶 Warning 6
View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.2
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/dev/threeadd/packeteventssk/api/general/PacketTypeRegistry.java`:
- Around line 42-44: You added a new public API method getAllPackets() but
removed the old directional getters; to avoid a compatibility break, restore
getAllSendPackets() and getAllReceivePackets() as deprecated wrappers that
delegate to the new method (or to PACKETS filtered by direction) and annotate
them with `@Deprecated` and a Javadoc pointing to getAllPackets(). Update
PacketTypeRegistry by reintroducing the two methods (calling getAllPackets() or
filtering PACKETS) and mark them deprecated so downstream code still compiles
for one transition release.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: eb1f3186-e024-4a11-b115-441c5e06de2f

📥 Commits

Reviewing files that changed from the base of the PR and between b8c59a5 and e5db462.

📒 Files selected for processing (5)
  • src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveListener.java
  • src/main/java/dev/threeadd/packeteventssk/api/general/PacketTypeRegistry.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/Types.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/effect/EffCancelPacket.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketField.java
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/main/java/dev/threeadd/packeteventssk/element/general/expressions/prop/ExprPacketField.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/effect/EffCancelPacket.java
  • src/main/java/dev/threeadd/packeteventssk/element/general/Types.java
  • src/main/java/dev/threeadd/packeteventssk/api/general/PacketSendOrReceiveListener.java

@3add
Copy link
Copy Markdown
Owner Author

3add commented May 15, 2026

@CodeRabbit rewrite the description of this PR to be more specific. Make it say

added:
changed:
fixed:

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@3add Here's the updated PR description with the Added / Changed / Fixed breakdown. Let me apply it now.


🏁 Script executed:

#!/bin/bash
gh pr edit 12 --repo 3add/PacketEventsSK --body "## Dev v1.1.1

### Added
- **GitHub Actions: Gradle Dev Build** (\`.github/workflows/gradle-build.yml\`) — CI workflow that builds on pushes to \`dev\` and uploads JARs as \`PacketEventsSK-Dev-Build\`
- **GitHub Actions: Qodana Code Quality** (\`.github/workflows/qodana_code_quality.yml\`) — Static analysis workflow triggered on PRs, pushes to \`dev\`/\`main\`, and manual dispatch
- **\`qodana.yaml\`** — Qodana configuration file using the \`qodana.starter\` profile with JDK 25 and the \`jetbrains/qodana-jvm-community:2025.3\` linter
- **\`paper-plugin.yml\`** — New Paper plugin descriptor with version placeholders (\`\${projectVersion}\`/\`\${apiversion}\`) and explicit dependency declarations for \`packetevents\`, \`Skript\`, and optional \`SkBee\`
- **\`ExprPacketPacketType\`** — New Skript \`SimplePropertyExpression\` exposing a \`packet type\` property on packet wrappers
- **\`PacketTypeRegistry.getAllPackets()\`** — New method returning a combined immutable list of all send and receive packet types
- **\`SELECT_BUNDLE_ITEM\`** packet registration in \`PacketConstructorRegistry\` wiring \`slot id\` and \`selected item index\` fields to \`WrapperPlayClientSelectBundleItem\`
- **\`PacketListenerPriority\` support in events** — \`EvtPacketSendOrReceive\` now accepts an optional priority tag (\`lowest|low|normal|high|highest|monitor\`) in Skript event patterns, defaulting based on \`ProcessType\`
- **\`getPriority()\`** method added to \`PacketSendOrReceiveEvent\` and its nested event classes

### Changed
- **Version bump to 1.1.1** — Introduced \`projectVersion\`, \`serverVersion\`, and \`apiVersion\` variables in \`build.gradle.kts\`; updated SkBee and SkriptRegistration dependency versions; \`shadowJar\` now uses \`projectVersion\` for artifact naming
- **\`README.md\`** — Requirements updated to reflect broader supported version ranges (Paper 1.21.10+, Skript 2.15.0+, SkBee 1.17.2+) instead of pinning to latest stable only
- **\`plugin.yml\` replaced by \`paper-plugin.yml\`** — Removed old \`plugin.yml\` plugin descriptor
- **\`PacketSendOrReceiveListener\`** — Rewritten to dispatch per \`PacketListenerPriority\` using separate per-priority listener sets; wrapper construction now uses \`PacketTypeCommon#getWrapperClass()\` reflection instead of \`EventPacketMapper\`; always calls \`markForReEncode(true)\` before dispatch
- **\`PacketSendOrReceiveEvent\`** — Constructor signatures updated to include \`PacketListenerPriority\`; propagated to all nested event classes (\`NettyPacketEvent\`, \`SyncPacketEvent\`, \`AsyncPacketEvent\`)
- **\`DebugUtil\`** — Expanded recursive value rendering to handle \`Optional\`, \`Map\`, \`Iterable\`, and arrays; ignores \`@Deprecated\` methods; maximum recursion depth increased from 3 to 5
- **\`PacketTypeRegistry\`** — Removed \`getAllSendPackets()\` and \`getAllReceivePackets()\` in favour of the new unified \`getAllPackets()\`
- **\`Types.java\`** — Updated \`packettype\`, \`blockentitytype\`, and \`signside\` Skript type registrations to accept optional plural forms; \`packettype\` supplier now uses \`PacketTypeRegistry.getAllPackets()\` directly
- **\`EventPacketMapper\`** — Removed entirely; functionality replaced by reflection-based wrapper construction in \`PacketSendOrReceiveListener\`
- **\`config.yml\`** — Version header updated to \`PacketEventsSK v1.1.1\`

### Fixed
- **\`EntityTracker\`** — \`onUserDisconnect\` now returns early if \`event.getUser().getUUID()\` is \`null\`, preventing a potential \`NullPointerException\` during cache removal
- **\`EffSendOrReceivePacket\`** — Skips processing for any target \`Player\` whose PacketEvents \`User\` cannot be resolved (null guard)
- **\`EffCancelPacket\`** — Cancelling/altering packets is now rejected at parse time if the listener priority is \`MONITOR\`
- **\`ExprPacketField\` (SET mode)** — Rejects field mutations at parse time when \`ProcessType\` is not \`NETTY\` or when listener priority is \`MONITOR\`; removed stale \`setModified(true)\` call
- **\`PacketEventsSK\`** — Removed erroneous registration of \`PacketSendOrReceiveListener\` during \`onLoad()\`; listeners are now registered on demand per priority"

Length of output: 516


Let me try writing the body to a file first:


🏁 Script executed:

#!/bin/bash
cat > /tmp/pr_body.md << 'PREOF'
## Dev v1.1.1

### Added
- **GitHub Actions: Gradle Dev Build** (`.github/workflows/gradle-build.yml`) — CI workflow that builds on pushes to `dev` and uploads JARs as `PacketEventsSK-Dev-Build`
- **GitHub Actions: Qodana Code Quality** (`.github/workflows/qodana_code_quality.yml`) — Static analysis workflow triggered on PRs, pushes to `dev`/`main`, and manual dispatch
- **`qodana.yaml`** — Qodana configuration using the `qodana.starter` profile with JDK 25 and the `jetbrains/qodana-jvm-community:2025.3` linter
- **`paper-plugin.yml`** — New Paper plugin descriptor with version placeholders and explicit dependency declarations for `packetevents`, `Skript`, and optional `SkBee`
- **`ExprPacketPacketType`** — New Skript `SimplePropertyExpression` exposing a `packet type` property on packet wrappers
- **`PacketTypeRegistry.getAllPackets()`** — New method returning a combined immutable list of all send and receive packet types
- **`SELECT_BUNDLE_ITEM` packet** registered in `PacketConstructorRegistry`, wiring `slot id` and `selected item index` fields to `WrapperPlayClientSelectBundleItem`
- **`PacketListenerPriority` support in events** — `EvtPacketSendOrReceive` now accepts an optional priority tag (`lowest|low|normal|high|highest|monitor`) in Skript event patterns, defaulting based on `ProcessType`
- **`getPriority()`** method added to `PacketSendOrReceiveEvent` and its nested event classes

### Changed
- **Version bump to 1.1.1** — Introduced `projectVersion`, `serverVersion`, and `apiVersion` variables in `build.gradle.kts`; updated SkBee and SkriptRegistration dependency versions; `shadowJar` now uses `projectVersion` for artifact naming
- **`README.md`** — Requirements updated to reflect broader supported version ranges (Paper 1.21.10+, Skript 2.15.0+, SkBee 1.17.2+) instead of pinning to latest stable only
- **`plugin.yml` replaced by `paper-plugin.yml`** — Removed old `plugin.yml` plugin descriptor
- **`PacketSendOrReceiveListener`** — Rewritten to dispatch per `PacketListenerPriority` using separate per-priority listener sets; wrapper construction now uses `PacketTypeCommon#getWrapperClass()` reflection instead of `EventPacketMapper`; always calls `markForReEncode(true)` before dispatch
- **`PacketSendOrReceiveEvent`** — Constructor signatures updated to include `PacketListenerPriority`; propagated to all nested event classes (`NettyPacketEvent`, `SyncPacketEvent`, `AsyncPacketEvent`)
- **`DebugUtil`** — Expanded recursive value rendering to handle `Optional`, `Map`, `Iterable`, and arrays; ignores `@Deprecated` methods; maximum recursion depth increased from 3 to 5
- **`PacketTypeRegistry`** — Removed `getAllSendPackets()` and `getAllReceivePackets()` in favour of the new unified `getAllPackets()`
- **`Types.java`** — Updated `packettype`, `blockentitytype`, and `signside` Skript type registrations to accept optional plural forms; `packettype` supplier now uses `PacketTypeRegistry.getAllPackets()` directly
- **`EventPacketMapper`** — Removed entirely; functionality replaced by reflection-based wrapper construction in `PacketSendOrReceiveListener`
- **`config.yml`** — Version header updated to `PacketEventsSK v1.1.1`

### Fixed
- **`EntityTracker`** — `onUserDisconnect` now returns early if `event.getUser().getUUID()` is `null`, preventing a potential `NullPointerException` during cache removal
- **`EffSendOrReceivePacket`** — Skips processing for any target `Player` whose PacketEvents `User` cannot be resolved (null guard)
- **`EffCancelPacket`** — Cancelling/altering packets is now rejected at parse time if the listener priority is `MONITOR`
- **`ExprPacketField` (SET mode)** — Rejects field mutations at parse time when `ProcessType` is not `NETTY` or when listener priority is `MONITOR`; removed stale `setModified(true)` call
- **`PacketEventsSK`** — Removed erroneous registration of `PacketSendOrReceiveListener` during `onLoad()`; listeners are now registered on demand per priority
PREOF

gh pr edit 12 --repo 3add/PacketEventsSK --body-file /tmp/pr_body.md
echo "Exit code: $?"

Length of output: 266


@3add Unfortunately, the gh pr edit command is blocked by workflow restriction settings in this environment, so I can't update the description directly. You can copy and paste the text below into the PR description yourself:


Dev v1.1.1

Added

  • GitHub Actions: Gradle Dev Build (.github/workflows/gradle-build.yml) — CI workflow that builds on pushes to dev and uploads JARs as PacketEventsSK-Dev-Build
  • GitHub Actions: Qodana Code Quality (.github/workflows/qodana_code_quality.yml) — Static analysis workflow triggered on PRs, pushes to dev/main, and manual dispatch
  • qodana.yaml — Qodana configuration using the qodana.starter profile with JDK 25 and the jetbrains/qodana-jvm-community:2025.3 linter
  • paper-plugin.yml — New Paper plugin descriptor with version placeholders and explicit dependency declarations for packetevents, Skript, and optional SkBee
  • ExprPacketPacketType — New Skript SimplePropertyExpression exposing a packet type property on packet wrappers
  • PacketTypeRegistry.getAllPackets() — New method returning a combined immutable list of all send and receive packet types
  • SELECT_BUNDLE_ITEM packet registered in PacketConstructorRegistry, wiring slot id and selected item index fields to WrapperPlayClientSelectBundleItem
  • PacketListenerPriority support in eventsEvtPacketSendOrReceive now accepts an optional priority tag (lowest|low|normal|high|highest|monitor) in Skript event patterns, defaulting based on ProcessType
  • getPriority() method added to PacketSendOrReceiveEvent and its nested event classes

Changed

  • Version bump to 1.1.1 — Introduced projectVersion, serverVersion, and apiVersion variables in build.gradle.kts; updated SkBee and SkriptRegistration dependency versions; shadowJar now uses projectVersion for artifact naming
  • README.md — Requirements updated to reflect broader supported version ranges (Paper 1.21.10+, Skript 2.15.0+, SkBee 1.17.2+) instead of pinning to latest stable only
  • plugin.yml replaced by paper-plugin.yml — Removed old plugin.yml plugin descriptor
  • PacketSendOrReceiveListener — Rewritten to dispatch per PacketListenerPriority using separate per-priority listener sets; wrapper construction now uses PacketTypeCommon#getWrapperClass() reflection instead of EventPacketMapper; always calls markForReEncode(true) before dispatch
  • PacketSendOrReceiveEvent — Constructor signatures updated to include PacketListenerPriority; propagated to all nested event classes (NettyPacketEvent, SyncPacketEvent, AsyncPacketEvent)
  • DebugUtil — Expanded recursive value rendering to handle Optional, Map, Iterable, and arrays; ignores @Deprecated methods; maximum recursion depth increased from 3 to 5
  • PacketTypeRegistry — Removed getAllSendPackets() and getAllReceivePackets() in favour of the new unified getAllPackets()
  • Types.java — Updated packettype, blockentitytype, and signside Skript type registrations to accept optional plural forms; packettype supplier now uses PacketTypeRegistry.getAllPackets() directly
  • EventPacketMapper — Removed entirely; functionality replaced by reflection-based wrapper construction in PacketSendOrReceiveListener
  • config.yml — Version header updated to PacketEventsSK v1.1.1

Fixed

  • EntityTrackeronUserDisconnect now returns early if event.getUser().getUUID() is null, preventing a potential NullPointerException during cache removal
  • EffSendOrReceivePacket — Skips processing for any target Player whose PacketEvents User cannot be resolved (null guard)
  • EffCancelPacket — Cancelling/altering packets is now rejected at parse time if the listener priority is MONITOR
  • ExprPacketField (SET mode) — Rejects field mutations at parse time when ProcessType is not NETTY or when listener priority is MONITOR; removed stale setModified(true) call
  • PacketEventsSK — Removed erroneous registration of PacketSendOrReceiveListener during onLoad(); listeners are now registered on demand per priority

@3add 3add merged commit 331c813 into main May 15, 2026
5 checks passed
This was referenced May 19, 2026
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.

2 participants