Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Fix particles not being hidden, infinite time

Open Cats1337 opened this issue 1 year ago • 1 comments

Information

This PR fixes #5509 .

Details

Proposed fix:

false -> true; actually hides the particles Integer.MAX_VALUE -> (int) Double.POSITIVE_INFINITY; Since 1.20 allows the value of infinite to be set for the potion time

this.getBase().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false)); -> this.getBase().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, (int) Double.POSITIVE_INFINITY, 1, true)); https://github.com/EssentialsX/Essentials/blob/b900444ff0b84a35574671e92674d323b86f503e/Essentials/src/main/java/com/earth2me/essentials/User.java#L989

https://github.com/Cats1337/Essentials/blob/b900444ff0b84a35574671e92674d323b86f503e/Essentials/src/main/java/com/earth2me/essentials/User.java#L989

Environments tested:

OS: Windows

Java version: 17

  • [x] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • [ ] CraftBukkit/Spigot/Paper 1.12.2
  • [ ] CraftBukkit 1.8.8

Demonstration:

Cats1337 avatar Sep 08 '23 11:09 Cats1337

Please see https://github.com/EssentialsX/Essentials/issues/5509#issuecomment-1711540233.

mdcfe avatar Sep 23 '23 13:09 mdcfe