item frame

This commit is contained in:
boy0001 2014-11-27 15:06:18 +11:00
parent 37d6f9c4d1
commit 4293e8f3f9
2 changed files with 5 additions and 2 deletions

View File

@ -312,7 +312,7 @@ public class Set extends SubCommand {
}
//
@SuppressWarnings("unchecked")
final ArrayList<Material> materials = (ArrayList<Material>) PlotWorld.BLOCKS.clone();
final ArrayList<Material> materials = (ArrayList<Material>) ((ArrayList<Material>) PlotWorld.BLOCKS).clone();
materials.add(Material.AIR);
//
final String[] strings = args[1].split(",");

View File

@ -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;