WorldGuard

WorldGuard

8M Downloads

Armor Stand interact event issue with the build flag

Anarchick opened this issue ยท 1 comments

commented

Versions
WorldEdit version: 7.2.0

WorldGuard version: 7.0.4

Platform version: Paper-1.16.4 (build 300)

Describe the bug
The flag "Interact" do not include armor stand interaction, but the flag "build" include it. So you can't allow non members of a region to interact with armor stands without allowing them to build.

To Reproduce

  1. Create a region
  2. Spawn an armor stand wearing an armor
  3. set flag "interact" to allow
  4. Try to interact with the armor stand with a non member
    1. set flag "build" to allow
  5. Try to interact with the armor stand with a non member

Expected behavior
The flag "Interact" should allow non members to right click on armor stands and trigger the event org.bukkit.event.player.PlayerInteractAtEntityEvent for other plugins

Additional context
The event org.bukkit.event.player.PlayerInteractAtEntityEvent is not triggered so my plugin can not detect when a player try to use my loot box (wich is an armor stand)

commented

you should be listening at lower priority and cancelling the event yourself. there's no way to know from WG's end if the user is modifying a protected region (i.e. by adding or removing items from the stand).