@SuppressWarnings("deprecation")
	@EventHandler
	public void onBlockDestroy(BlockBreakEvent event){
		if(event.getBlock().getTypeId() != 0){
			plates = plugin.getPlates();
			for(int i = 0; i< plates.size(); i++){
				Location loc = new Location(event.getPlayer().getWorld(),event.getBlock().getLocation().getBlockX(), event.getBlock().getLocation().getBlockY(), event.getBlock().getLocation().getBlockZ());
				Location loc2 = new Location(plates.get(i).getLocation().getWorld(), plates.get(i).getLocation().getBlockX(),plates.get(i).getLocation().getBlockY()-1,plates.get(i).getLocation().getBlockZ());
				if(plates.get(i).getLocation().equals(event.getBlock().getLocation())){
					if(plates.get(i).getOwner().equalsIgnoreCase(event.getPlayer().getDisplayName())){
						event.getPlayer().sendMessage(ChatColor.GREEN+"You removed the pressure plate.");
						plates.remove(i);
						plugin.setPlates(this.plates);
						plugin.RemoveLine();
						event.getPlayer().getInventory().addItem(new ItemStack(264,1));
						event.getPlayer().updateInventory();
						event.setCancelled(false);
						break;
					}else{
						event.getPlayer().sendMessage(ChatColor.RED+"This pressure plate is not yours.");
						event.getPlayer().sendMessage(ChatColor.RED+"don't try to remove it.");
						event.setCancelled(true);
					}
				}else if(loc2.equals(loc)){
					if(plates.get(i).getOwner().equalsIgnoreCase(event.getPlayer().getDisplayName())){
						event.getPlayer().sendMessage(ChatColor.GREEN+"You removed the pressure plate.");
						plates.remove(i);
						plugin.setPlates(this.plates);
						plugin.RemoveLine();
						event.getPlayer().getInventory().addItem(new ItemStack(264,1));
						event.getPlayer().updateInventory();
						event.setCancelled(false);
						break;
					}else{
						event.getPlayer().sendMessage(ChatColor.RED+"This pressure plate is not yours.");
						event.getPlayer().sendMessage(ChatColor.RED+"don't try to remove it.");
						event.setCancelled(true);
					}
				}
			}
		}
	}