bekvon / Residence

Residence Bukkit Plugin
GNU General Public License v3.0
105 stars 174 forks source link

EntityDamageByEntityEvent Doesnt implement case for item frames, That bukkit now uses to check item frames. #95

Closed Noobidoo closed 10 years ago

Noobidoo commented 10 years ago

This was also reported in bukkit ticket system (http://dev.bukkit.org/bukkit-plugins/residence/tickets/495-item-of-item-frames-not-protected/) I propose to add:

        if (ent instanceof ItemFrame) {
          if (area == null) {
                    if (!Residence.getWorldFlags().getPerms(damager.getWorld().getName()).has("build", true)) {
                        event.setCancelled(true);
                    }
                } else {
                    if (!area.getPermissions().has("build", true)) {
                        event.setCancelled(true);
                    }
                }
        }

into https://github.com/bekvon/Residence/blob/d1cb486f0e9e091814218c2d6be7503d955758bd/src/com/bekvon/bukkit/residence/listeners/ResidenceEntityListener.java#L262

javacraft commented 10 years ago

Addressed in Pull #96