WorldGuard

WorldGuard

8M Downloads

Can access armor stands in protected regions

LadyCailinBot opened this issue ยท 8 comments

commented

WORLDGUARD-3291 - Reported by Mick43190

Hello,
There is a problem with the armor stand, a no-member of the zone can exchange an item that is placed on it.
(ex: exchange a diamond helmet with another iron ...).

commented

Comment by PseudoKnight

There's a new INTERACT_AT packet, so I guess someone thought it would be a good idea to create a new event for it instead of just passing the click position to the PlayerInteractEntityEvent. It's confusing, though, because the AT event works for all the same entities, it's just you have to cancel the AT event for armor stands and the regular event for everything else.

commented

Comment by PseudoKnight

Armor stand support was added weeks ago.

commented

Comment by Mick43190

Yes the Amor stand is secure, but is possible to exchange item on this

commented

Comment by sk89q

I'm not sure Spigot notifies plugins of access to armor stands, so I'm afraid there's nothing we can do at the moment.

commented

Comment by PseudoKnight

Canceling the PlayerInteractAtEvent can protect armor stands, but that appears to be what you're already doing. It's possible something broke when you changed to the interact flag, but once again there's too little information on this report.

commented

Comment by sk89q

I checked Spigot's code and didn't see anything.

Also, you can use the event logging mode (http://docs.enginehub.org/manual/worldguard/latest/troubleshooting/event-logging/) to see what WG picks up, and no event was fired (that WG tracks) for armor stands.

commented

Comment by PseudoKnight

Excuse me, I meant PlayerInteractAtEntityEvent. It was funneled into PlayerInteractEntityEvent here:
https://github.com/sk89q/WorldGuard/blob/f106aa586509a75acc54d5bda515234019f554cd/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java#L639

It should be protecting them on the spigot1.8-6.x branch, just not on the master branch.

commented

Comment by sk89q

Oh, didn't know about that event, though I pulled it.

I don't understand why it exists.