Skip to content

Fix/protocollib 1.21 - #6

Open
GWServer wants to merge 25 commits into
Leymooo:masterfrom
GWServer:fix/protocollib-1.21
Open

Fix/protocollib 1.21#6
GWServer wants to merge 25 commits into
Leymooo:masterfrom
GWServer:fix/protocollib-1.21

Conversation

@GWServer

Copy link
Copy Markdown
  • Fix 'Field index 0 is out of bounds' error
  • Add null checks and try-catch for version compatibility
  • Update to Java 17
  • Update ProtocolLib to 5.4.0"

@GWServer

Copy link
Copy Markdown
Author

Fix compatibility with Minecraft 1.21+

Changes:

  • Fixed bug Field index 0 is out of bounds in ProtocolLibUtils
  • Added checks for null and isOnline() player status in CooldownManager
  • Added `try-catch' error handling to avoid crashes when the player exits
  • Fixed problems with sending packets at PlayerQuitEvent

Testing:

  • Tested on Paper 1.21.11
  • The plugin works stably without crashes
  • Cooldowns work correctly when the player exits

Impact:

  • The plugin no longer crashes when the player exits
  • Improved stability on high online servers

Fixes # (issue number, if any)

@GWServer

Copy link
Copy Markdown
Author
  1. Remove OP Bypass Checks (Your Changes)
    Removed all hardcoded player.isOp() checks from protection modules

Plugin now fully respects the permission system without automatic OP override

Fixed syntax errors in pLisbListener.java creative tab check

Updated build.gradle.kts to use system Java 17 (removed GraalVM vendor requirement)

Files Modified:

src/main/java/main/java/me/dniym/enums/Protections.java

src/main/java/main/java/me/dniym/listeners/Listener113.java

src/main/java/main/java/me/dniym/listeners/fListener.java (7 locations)

src/main/java/main/java/me/dniym/listeners/pLisbListener.java

src/main/java/main/java/me/dniym/timers/fTimer.java (2 locations)

  1. Upstream Merge (From commit 508277b)
    Refactored BlockBadItemsFromCreativeTab protection

Added new CreativeItemCheck class for safer creative item validation

Improved logging for creative item blocks

Added unit tests for CreativeItemCheck

Updated version to 2.9.15-SNAPSHOT

Added test dependencies (JUnit 5, Mockito)

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