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

Progress must be between 0.0 and 1.0 (NaN) error during PlayerItemConsumeEvent #319

Closed
3 tasks done
thisisaef opened this issue Sep 24, 2024 · 1 comment
Closed
3 tasks done
Assignees
Labels
type: bug Something is not working as intended

Comments

@thisisaef
Copy link

Server software and version

Paper 1.21.1-96-4514c71 (MC: 1.21.1)

Expected behavior

The BossBar should update normally, showing the player's XP progress after consuming an item without causing any errors.

Actual behavior

An exception is thrown (IllegalArgumentException: Progress must be between 0.0 and 1.0), causing the event to fail, and the XP BossBar is not displayed properly.

How to reproduce

  1. Install AuraSkills v2.2.3 on a Paper 1.21.1 server.
  2. Have a player consume an item (e.g., food or potions).
  3. Observe the server console for the PlayerItemConsumeEvent error related to BossBar.setProgress().

Additional information

The error seems related to how the plugin calculates the progress for the BossBar, potentially due to a divide-by-zero or other calculation error, resulting in a NaN value. This happens consistently upon item consumption by players.

Agreements

@thisisaef thisisaef added the type: bug Something is not working as intended label Sep 24, 2024
@thisisaef
Copy link
Author

thisisaef commented Sep 24, 2024

Describe the bug
When a player consumes an item on the server, AuraSkills triggers an error in the BossBar.setProgress() method, receiving an invalid NaN (Not a Number) value instead of a valid progress percentage. This prevents the correct display of the XP bar and causes the event to fail.

Log
latest.log: https://paste.helpch.at/uyesavilig.md

Intybyte added a commit to Intybyte/AuraSkills-PR that referenced this issue Sep 26, 2024
@Archy-X Archy-X closed this as completed Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants