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

Issue with potion condition #484

Open
wants to merge 284 commits into
base: premium
Choose a base branch
from
Open

Conversation

Alexz1008
Copy link

Sorry, I changed more things than I wanted to, the SQLIO.java and CmdBackup.java don't have to be pulled.

To reproduce the issue:

  1. Have a passive that checks every 5 seconds whether you have slowness rank 0 to 999 active. Make this passive message you or otherwise notify you when it's true.
  2. Have any other potion effect besides slowness (I used speed 3 and jump 3 for what it's worth)
  3. Notice that the condition is true, even if slowness is not active, and you will get the notification that you set.

Essentially, the problem is that when the player doesn't have the potion, line 72 gives a null pointer exception, leading to Line 59 to catch the exception. I don't actually know what the catch is for otherwise so maybe I broke some logic, but at least in my simple case it works with this fix.

@Alexz1008
Copy link
Author

Also fixed a bug where the bar would overwrite items in the inventory. This was because com.sucy.skill.api.player.countOpenSlots would count equipment slots and offhand as an empty slot. As such, if your bar was size 5 and you had no armor or offhand item but a full inventory, the bar would replace whatever was there. I fixed it with a hard-coded number for now but change it as you wish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants