ChanceSD/PvPManager-Issues

Eating cancelled by interact setting in config

Closed this issue · 3 comments

Describe the bug
It's impossible to eat in combat if player is aiming into any solid block in range if Interaction in combat is disabled in config.
Players have reported this issue to us as a very annoying bug because sometimes they die in fight as they can't replenish their hunger bar if by accident cursor is on any block.

To Reproduce
Steps to reproduce the behavior:

  1. Set Interact blocking in combat to "true".
  2. Tag yourself in combat.
  3. Try to eat while aiming into any solid block.

Expected behavior
Interact option should cancel only interacting with specific blocks like doors, levers etc. instead of cancelling every interaction or allow to eat if player started consuming while aiming on solid block.

Plugin and Server version
PvPManager v.3.17.2
Paper version git-Paper-411 (MC: 1.17.1)

Screenshots
foodbug

There's a reason blocking interact comes disabled by default, it's not really a bug, it blocks every interaction.
Honestly it was just added because someone requested it and I thought "why not" and made it an option available.
Eating shouldn't get blocked tbh but it's how spigot works when you cancel the interact event, it kinda bugs eating.
I suppose I could make an exception and not block it when the player is holding any type of food, the tricky part is doing that across all versions from MC 1.8.8 to now.

Wouldn't it be the best solution to allow owners to decide for themselves by typing in the config which interactions should be blocked?
Something like this if someone want only specific blocks:

  Block:
    Interact: true
        Blacklist:
            - 'wooden_doors'
            - 'buttons'
            - 'beds'
            - 'lectern'
            - etc.

or like this if someone want to block every interaction:

  Block:
    Interact: true
        Blacklist:
            - '*'

I do not know if such a proposal would be difficult to implement, but the freedom of choice would probably be quite an interesting option. ^^"

You probably don't care about this anymore since it's been so long but I added this, will be in the next update.
Thanks for the suggestion.