Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix particles not being hidden, infinite time #5510

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

Cats1337
Copy link

@Cats1337 Cats1337 commented Sep 8, 2023

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));

this.getBase().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false));

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

Environments tested:

OS: Windows

Java version: 17

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

Demonstration:

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
@mdcfe
Copy link
Member

mdcfe commented Sep 23, 2023

Please see #5509 (comment).

@mdcfe mdcfe added the status: waiting on author Pull requests that require changes from the author in order to merge. label Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting on author Pull requests that require changes from the author in order to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vanish uses incorrect potion attributes
2 participants