-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Added PlayerUseBowWithoutProjectileEvent #11668 #11669
Added PlayerUseBowWithoutProjectileEvent #11668 #11669
Conversation
…a crossbow or draw a bow without having a suitable projectile in their inventory. Makes it possible to set a projectile and enable the player to use the weapon nevertheless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to paper and thank you for your first PR 🥳
Left some basic comments regarding annotations.
The PR is also missing javadocs on the API types.
Beyond that, the event name feels a bit off, the player isn't using the bow there, it is searching for a projectile. We already have some other events there so maybe we can look into merging those concepts? Not sure tho.
patches/api/0501-Added-PlayerUseBowWithoutProjectileEvent.patch
Outdated
Show resolved
Hide resolved
patches/api/0501-Added-PlayerUseBowWithoutProjectileEvent.patch
Outdated
Show resolved
Hide resolved
patches/api/0501-Added-PlayerUseBowWithoutProjectileEvent.patch
Outdated
Show resolved
Hide resolved
Maybe PlayerTryUseBowWithoutProjectileEvent would be better? I already thought about using the PlayerReadyArrowEvent for this. |
…ectileEvent
No you are not missing anything I don't think. Naming wise, well, realistically this should probably not be limited to bows only. I'll try to get this PR into a pr party next weekend so I can poke some other maintainers on a better name for this, but I think the functionality this is adding is worth having 👍 |
Added PlayerUseBowWithoutProjectileEvent when a player tries to load a crossbow or draw a bow without having a suitable projectile in their inventory. Makes it possible to set a projectile and enable the player to use the weapon nevertheless.