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

Fixed server crash when applying a cooldown to any item with 1 count #6491

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

ipad54
Copy link
Member

@ipad54 ipad54 commented Nov 10, 2024

Introduction

This was introduced in #6405

The crash happens because ItemSerializer can not serialize an item with 0 count in onItemCooldownChanged(). This can happen when you have 1 ender pearl since resetItemCooldown() is called only after a successful item usage, so ender pearl count is already decreased at this stage.

Relevant issues

#6490
#6488

Tests

https://www.youtube.com/watch?v=KSZC6mmEGk4

This commit fixes server crash when applying a cooldown to any item which count is equals to 1.
@dktapps dktapps merged commit 2ff6470 into pmmp:stable Nov 10, 2024
15 checks passed
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