Essentials
Essentials copied to clipboard
Fix particles not being hidden, infinite time
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:
Please see https://github.com/EssentialsX/Essentials/issues/5509#issuecomment-1711540233.