IntellectualSites / PlotSquared

PlotSquared - Reinventing the plotworld
GNU General Public License v3.0
550 stars 754 forks source link

Armor stands can be broken by anyone in plots #125

Closed PhanaticD closed 9 years ago

PhanaticD commented 9 years ago

Pretty much as the title says, armor stand can be broken by anyone regardless of being added to a plot or not

git-Spigot-952179b-bbf72f3 plotsquared 2.6.3

recon88 commented 9 years ago

They can also be placed by anyone in any plot. Plus everyone can take out or put on armor from ArmorStands. Having both issues.

For taking/putting Armor: There's a new Event which can be cancelled: PlayerInteractAtEntityEvent That disallows interaction with ArmorStands if you cancel it.

For breaking (Fixed): EntityDamageByEntityEvent needs an additional check: (e.getEntity() instanceof ArmorStand)

For Placing: Placing ArmorStand doesn't trigger the BlockPlaceEvent as far as I know. Therefore we need an additional check for ArmorStands in the PlayerInteractEvent and cancel it always. The problem is the "plots.admin.interact.other". I guess he is using that like I do. I want players to be able to interact with buttons etc but I don't want them to place Armorstands. This also includes placing Boats and Minecarts. They need to be added to the ArmorStand check as well. Otherwise you can spam them everywhere with the interact permission.

PhanaticD commented 9 years ago

this was actually fixed for the most part, at least the breaking is, just in the config set pve: false

recon88 commented 9 years ago

Yep, breaking seems to be fixed.