Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

ESSX Discord: Added a check for announceAdvancements gamerule

Open JellyBlade opened this issue 3 years ago • 0 comments

Information

This PR fixes #4865.

Details

Proposed fix:
Added a check for the player's current world's announceAdvancements gamerule in the advancements listener to prevent the message from being sent if that gamerule is disabled for the world.

Environments tested:

OS: Windows 10 for client, assuming some version of Ubuntu LTS for the server (server provider doesn't specify, so assuming the same as what they run for VPS services)

Java version: Built on openjdk 17.0.1, ran on unknown version of Java 17 (server provider doesn't specify beyond 17)

  • [x] Paper 1.18 (can upgrade server to test if necessary)
  • [ ] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • [ ] CraftBukkit/Spigot/Paper 1.12.2
  • [ ] CraftBukkit 1.8.8

Demonstration: Before fix, while testing the gamerule (Only the first one should've been sent, the rest are erroneous from the advancement being automatically revoked) image After fix, only one advancement sent, even after completing the criteria multiple times in a world with announceAdvancements disabled. image

JellyBlade avatar Mar 22 '22 06:03 JellyBlade