diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java index 6354618fa..3ee4df0d0 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -312,7 +312,7 @@ public class Set extends SubCommand { } // @SuppressWarnings("unchecked") - final ArrayList materials = (ArrayList) PlotWorld.BLOCKS.clone(); + final ArrayList materials = (ArrayList) ((ArrayList) PlotWorld.BLOCKS).clone(); materials.add(Material.AIR); // final String[] strings = args[1].split(","); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index 55dfc84b4..84137b4e4 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -29,11 +29,13 @@ import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; + import org.bukkit.*; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; import org.bukkit.entity.Entity; +import org.bukkit.entity.ItemFrame; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -42,6 +44,7 @@ import org.bukkit.event.block.*; import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.EntityChangeBlockEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.hanging.HangingPlaceEvent; @@ -670,7 +673,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi final Player p = (Player) d; final boolean aPlr = a instanceof Player; final PlotWorld pW = getPlotWorld(l.getWorld()); - if (!aPlr && pW.PVE) { + if (!aPlr && pW.PVE && (!(a instanceof ItemFrame))) { return; } else if (aPlr && pW.PVP) { return;