Crazy-Crew / CrazyVouchers

Want to make a paper that can give you an axolotl with a pretty firework display, Look no further!
https://modrinth.com/plugin/crazyvouchers
MIT License
9 stars 9 forks source link

[Bug Report]: Offhand item usage #31

Closed fucksophie closed 1 month ago

fucksophie commented 1 year ago

Spark link

No response

Server Version

1.19.4

Server Platform

Paper

Describe the bug

You can't use vouchers in your offhand - the code doesn't allow for a permission to exist for offhand usage

Steps to reproduce

  1. Hold a voucher in your offhand
  2. Rightclick.

Additional context

https://github.com/Crazy-Crew/CrazyVouchers/blob/1b0192939759912e8ef513501e65592a8395d733/src/main/java/com/badbones69/crazyvouchers/controllers/VoucherClick.java#L57 The permission message is sent, even though no permission is checked.

Agreements

ryderbelserion commented 1 month ago

I just realized, there is no permission check because there doesn't need to be one. it isn't actually a bug.

we check if the hand is not null and if the the slot is off_hand thus the message is called no_permission_to_use_voucher_in_offhand because technically you don't. the message is configurable so you can set it to anything you want regardless of what the key is called in the config.yml

fucksophie commented 1 month ago

The main issue is the fact that there is no way to use the vouchers while it's in your offhand.

ryderbelserion commented 1 month ago

The proper thing to do then is make a suggestion, a bug is unintended. this is intended.